Can't open recordset on Oracle 7.1 db using ODBC
Date: 1996/07/12
Message-ID: <31e69a9e.4692956_at_dub-news-svc-3.compuserve.com>#1/1
I really need some ODBC help. I am having trouble getting a VB 4.0 (16 bit) app to connect to an ODBC database and open a recordset. The connect is successful, I can create the querydef successfully, but I can't for the life of me create a snapshot. I've read and reread the manuals, the online help, and have tried various things all to no avail.
Here is my code:
Dim BepDB As Database
'Query Definitions
Dim GetProfile As QueryDef 'used at login
Dim UserProfile As Snapshot
'Open the database
Set BepDB = OpenDatabase("BEP_IVR", False, False, _
"ODBC; UID=bep_ivr; PWD=bep; LOGINTIMEOUT=30;")
'Set the default timeout for DB operations to 30 seconds
BepDB.QueryTimeout = 30
'Create all the query objects
Set GetProfile = BepDB.CreateQueryDef("", _
"select opr_ivr_password,opr_ivr_prompt_level " _ + "from opr_operator_person " _ + "where opr_person_id=999999")
Set UserProfile = GetProfile.OpenRecordset(dbOpenSnapshot, dbReadOnly)
when I execute the above code everything works fine until the last statement, which results in error code 3078. The error text that comes back is:
Couldn't find input table or query 'BEP.OPR_OPERATOR_PERSON'. [3078]
The table really does exist in the database. I have an ODBC monitoring tool (from Mercury Interactive) that shows the JET engine querying the remote Oracle database via ODBC and retrieving a list of all the table's columns and their datatypes and lengths. But that's where it stops and I get the error.
Further, I have an Oracle supplied "ODBC Test" tool that allows me to connect and execute the same query with no problems at all. So I think the problem must lie in the interface between the JET engine and ODBC.
I would really appreciate some help or insite on this because I seem to have pretty much "hit the wall" on it.
thanks,
Jonathan Gennick Received on Fri Jul 12 1996 - 00:00:00 CEST