rdoEnvironments(0).CursorDriver = rdUseOdbc

Set Env1 = rdoEngine.rdoEnvironments(0)
Set CN = Env1.OpenConnection(odbcBud, rdDriverNoPrompt, False, sCon)
CN.QueryTimeout = 0

SQL1 = "SELECT * " & _
"FROM BorramePresupuesto " & _
"WHERE (len(CENTRAB)>16 or len(DEPTO)>16 or len(MONEDA)>1 or len(CVE_EGRESO)>1 or " & _
"len(TIPOREC)>2 or len(RENGLON)>3 or len(TIPO_PPTO)>1 or len(CVE_GASTO)>1 or " & _
"len(PROYECTO)>10 or len(OBRA)>11 or len(SUBDIR)>4 or len(PIN_PEF)>24 or len(CONOR)> 6) "


Set Rset1 = cn.OpenResultset(SQL1, rdOpenKeyset, rdConcurReadOnly, rdExecDirect)

If Rset1.RowCount > 0 Then


Quote Originally Posted by dougb View Post
To answer your question yes I am using ODBC to talk to the SQL database server.
Did a bit more research yesterday and found some information on Microsoft site (Knowledge base article 154825) that suggested using the following code to force the ODBC to use local cursors not server cursors and all appears to be working fine for me now.

Thank you for your guidance.

The following line was added in to my VB code
rdoEnvironments(0).CursorDriver = rdUseOdbc