Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle DSN 1

Status
Not open for further replies.

beruken

Programmer
Mar 12, 2002
22
0
0
US
I have a DSN connection to an Oracle DB. I can connect to the Database no problem but when I try yo reference a particular table in my query I get the message

"TABLE OR VIEW DOES NOT EXIST"

Set oOracle = WScript.CreateObject("ADODB.Connection")
oOracle.Open "FileDSN=Luf.dsn;UID=hunt;PWD=changeme"
Set oRst2 = WScript.CreateObject("ADODB.Recordset")
sQuery = "SELECT * FROM MGR_ACCT WHERE acct_id LIKE '2EX8A%'"
oRst2.Open sQuery, oOracle

I know the table names and fields are spelled properly since I can connect through MS Access's "linked tables" feature and see all the tables and records.

Any Ideas Why?

Thanks
 
Does "hunt" own the objects? Does "hunt" have SELECT priviledges? Try a different query (SELECT SYSDATE FROM DUAL;) to verify that you are really attached to the DB. Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
SELECT SYSDATE FROM DUAL WORKED! Yes Hunt has access to the objects. As I said I can open a linked connection to the DB and tables in Access 2000.
 
The issuse is not just 'access to the objects' but ownership
of the objects... In Oracle a table has a 2 part name:
schema.tablename
So, if hunt does not own ( that is, if it is not in his schema) the table you need to specify the schema as well as the tablename ; so, if SCOTT ( for example only) owns
MGR_ACCT, you would need to specify SCOTT.MGR_ACCT when querying...

hth
[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top