Re: Timeout on recordset retrieval/Opening recordset passing comma

From: Nikki Locke (NikkiLocke_at_discussions.microsoft.com)
Date: 07/16/04


Date: Fri, 16 Jul 2004 01:37:01 -0700

I am using version 2.71.9030.4.

I wish I did have a version with the bug - my problem is that the query times out when I don't want it to.

However the article hints that there is a dynamic property of a recordset to set the timeout, so maybe I should try setting that to zero, or a very large value.

-- 
Nikki Locke (http://www.trumphurst.com/) 
"Val Mazur" wrote:
> Hi,
> 
> Which version of MDAC are you using? It was a bug related to it, but it was 
> fixed in MDAC 2.6.
> If this is not the case, then there is another bug, which was not fixed and 
> it is described in next KB
> 
> http://support.microsoft.com/default.aspx?scid=kb;en-us;188858&Product=ado
> 
> -- 
> Val Mazur
> Microsoft MVP
> 
> 
> "Nikki Locke" <NikkiLocke@discussions.microsoft.com> wrote in message 
> news:3602EA20-6C97-4839-93F3-EB8C493E3DA1@microsoft.com...
> >I have a need to open a recordset without a timeout (my current queries,
> > despite being adAsyncFetchNonBlocking and running in a separate thread, 
> > are
> > timing out due to the default timeout).
> >
> > The only way I have found so far to do this is to set up a Command object,
> > and pass it to the recordset open method.
> >
> > I have some test code in VB, which works fine...
> >
> > Set oConn = New ADODB.Connection
> > oConn.Open "<connection string here>"
> > Set oCmd = New ADODB.Command
> > Set oRS = New ADODB.Recordset
> > oCmd.ActiveConnection = oConn
> > oCmd.CommandTimeout = 0
> > oCmd.CommandText = "Select * from [Part Master]"
> > oCmd.CommandType = adCmdText
> > oRS.CursorLocation = adUseClient
> > oRS.Open oCmd, , adOpenKeyset, adLockUnspecified, adAsyncFetchNonBlocking
> >
> > But trying to implement the same thing in C++ gives an error "Arguments 
> > are
> > of the wrong type, are out of acceptable range, or are in conflict with 
> > one
> > another."
> >
> > Here is my code - what is wrong with it?
> >
> > pCommand->put_ActiveConnection(
> > _variant_t((IDispatch *)m_pConnection,true));
> > pCommand->PutCommandTimeout(0);
> > pCommand->CommandText = _bstr_t(pRecOpenInfo->m_sQuery);
> > pCommand->CommandType = ADODB::adCmdText;
> > pRstRecOpen->put_CursorLocation(ADODB::adUseClient);
> >
> > _variant_t vtempty;
> >
> > pRstRecOpen->Open( _variant_t((IDispatch *)pCommand, true),
> > vtempty, ADODB::adOpenKeyset, ADODB::adLockOptimistic,
> > ADODB::adAsyncFetchNonBlocking);
> >
> > -- 
> > Nikki Locke (http://www.trumphurst.com/)
> > 
> 
> 
> 


Relevant Pages

  • RE: Protocol Error in TDS Stream vs Network Packet Size
    ... We reported this problem and finally we confirmed that it is a bug. ... For MSQuery, ODBC driver is used which has a problem in retrieving large ... the field definition for the recordset is too large to fit in one ...
    (microsoft.public.sqlserver.connect)
  • Re: Causing File Download on Page Load
    ... or Windows Mail (which are infamous for this bug), ... you had suggested that isMethod was shown "above" ... but before the timeout occurs. ... The timeout triggers the download. ...
    (comp.lang.javascript)
  • Re: Racoon(8) Deleting SPD Entries
    ... It appears to be a bug in Racoon; ... security policy it gives it a timeout equal to the timeout on the SA. ... tunnelling to/from only particular networks but with the remote tunnel ...
    (freebsd-net)
  • Re: select & gettimeofday
    ... > There is no bug, and in fact you cannot tell, in a user process, ... timeout is the approximate amount ... Moritz Franosch ...
    (comp.os.linux.development.system)
  • [PATCH 2.4] tipar char driver: wront timeout value
    ... The formula used to calculate jiffies from timeout was wrong. ... The new formula is ok and takes care of integer computation/rounding. ... This bug has already been fixed in the 2.6 kernel. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)