
Error 3234: ODBC--remote query timeout expired
Quote:
> I'm using VB 4.0 along with 32-Bit ODBC driver to create a snapshot recordset
> of an Oracle database. My SQL Select statement contain 2 nested INNER JOIN
> commands:
> Join$ = "table3 INNER JOIN table2 ON table3.fieldx = table2.fieldx"
> Join$ = "table1 INNER JOIN (" & Join$ & ") ON table1.fieldx = table2.fieldx"
> SQL$ = "SELECT fieldx FROM " & Join$ & ";"
> I then create the recordset:
> Set RS = Db.OpenRecordset(SQL$, dbOpenSnapshot)
> This works fine and creates the snapshot recordset with out a hitch. But,
> whenever I add a WHERE clause to the end of my select statement:
> SQL$ = "SELECT fieldx FROM " & Join$ & " WHERE fieldx = 'some data';"
> I get a time out error "Error 3234: ODBC--remote query timeout expired." I get > this time out at exactly 1 minute after I execute my query.
> My database administrator says that the problem is most likly with my ODBC
> setup but ODBC-32 seems to be set up correctly. Any idea what's happening?
The default QueryTimeout is 60 secs. You can get your VB program
to ATTEMPT to change it using SetDataAccessOption, rtfm. However
the default is set when 1st loading the ODBC drivers. So, if
you use ODBC from say Access as well as from your VB appln, then
whichever loads 1st, sets it.
You can also specify QueryTimeout prior to the query, again rtfm.
If you believe that the query should not take that long, then
look at your indexes in Oracle. Do they match your Where clause?
Maybe get your db admin to confirm this.
HTH
--
ernest at Noel Systems, near Kingston-upon-Thames (UK)