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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle connectivity using ADO for DSN connection

Status
Not open for further replies.

isaisa

Programmer
May 14, 2002
97
IN
Hi all,
I am facing problem when connecting to oracle database. i tried using Oracle provider "MSDORA". I used ADO and Command object for invokation of the stored procedure. It is working fine.
I want to use DSN based connection now. This is as per my client requirment. I am getting the connection. But while invoking the stored procedure i am getting exception. Is there any different way to invoke stored procedure with DSN connection ??? I am confused in this and not able to understand the funda of DSN and DSN less kind of connections and the way by which i should invoke the stored procedure .....

thanks in advance ....

sanjay
 
A DSN is nothing more that a storage mechanism for the connection information. There should be no difference between a DSN connection and a non DSN connection that are configured the same way. Mostly the driver being used is the main attribute of a connection.

-pete
 
Thanks Pete for your help.

The point where i am getting stuck up is that the stored procedure is not getting invoked when in try with DSN connection. I am using the same connection object for invoking the procedure. I could not trace the exception also. While debugging the application i could see that the error is unspecified. I have came across this kind of error when using DNS less connection. I set the environment variable named "ORACLE_HOME" to home directory of ORACLE and i got the connection and stored procedure invokation proper.

Thanks in Advance.

Sanjay
 
Well I can’t attest to it, I have not tried all permutations, but I have to imagine that any DSN less connection string can be duplicated in a DSN entry. I would also believe that a connection based on the same configuration would behave the same. This leaves me to assume that either the configurations are not identical or the problem lies elsewhere in the project.

-pete
 
Hi Pete,
I got it. There was some problem with the driver. Again one important point i missed out while connecting to ORACLE database is that the enviromental variable named "ORACLE_HOME" was not set to oracle home directory. It is giving me proper result with DSN based connection with the same snipet of the code.

Thanks anyway for your help.
Sanjay
 
By the way, you could use Oracle native
1. OCI (Oracle Call Interface), but is complicate
2. OO4O (OLE Objects For Oracle), look a bit like ADO, but is designed especially for Oracle. Is very simple to use in C++ and/or VBS/JS

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top