This discussion is archived
1 Reply Latest reply: Nov 21, 2012 4:31 AM by Tridus RSS

SQLPlus works but calls from our app through ODBC fail

975435 Newbie
Currently Being Moderated
Problems on customer site, attempting to connect our app (which uses MS ODBC functions) to Oracle db. Appears to connect, but simple query of table returns error. SQLPlus doing the same thing works fine.

First the working SQLPlus scenario:-

SQLPlus
connect batch/batch@prod
select artikel from ifsapp.fps_artikelstamm_tab where artikel ='1006428';
ARTIKEL
1006428

Now the failing scenario in our own code:-

connect using this connection string: Driver={Microsoft ODBC for Oracle};Server=PROD;Uid=batch;Pwd=batch;
attempt to retrieve field names for table using this statement: SELECT * FROM [FPS_Artikelstamm_tab]
The error message coming back from Oracle is:
ORA-00942: Tabelle oder View nicht vorhanden
which in English is ‘table or view does not exist’.


I suspect there is something missing from one of our statements but it is hard to work out when the customer is in Germany and we are talking to them via our German dealer!

Any suggestions?

David

Edited by: user3546860 on 21-Nov-2012 01:19
  • 1. Re: SQLPlus works but calls from our app through ODBC fail
    Tridus Journeyer
    Currently Being Moderated
    First thing that comes to mind is that you don't have a public synonym on FPS_Artikelstamm_tab. If that's the case and the user" batch" doesn't own it, you'll need to access it with the schema name, which is what you did in your SQLPlus connection: ifsapp.fps_artikelstamm_tab. If that's the case, this query in SQLPlus will also fail: select artikel from fps_artikelstamm_tab where artikel ='1006428';

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points