Oracle OleDB and ADO Ora-12514

Oracle OleDB and ADO Ora-12514

Post by Giovann » Fri, 31 Oct 2003 18:28:36


Hello everyone, I've got an application usingo ADO to connect to an 8i
Oracle Database.
I used this connection method I used MS OleDb for Oracle
dim cnn as new ADODB.connection
with cnn
.provider = "MSDAORA.1"
.connectionstring= username & "/" & passwd & "@" servicename
.open
end with
I servicename is the same service name (a kind like
"myservice.oracleservername") I used to build a service denomination (a kind
like "johndoe.ora81") into Oracle Client configuration.
The result was an error Ora-12514 "unable to find service name".
I tried to use as servicename the service denomination (johndoe) I built
into Oracle client but the result was the same.
Finally I installed ODBC Oracle driver and setted a user DNS to "myDNS" and
the using this it worked out:
with cnn
myConnectionstring= "PROVIDER= MSDAORA.1; DNS=myDNS"
.open myConnectionstring, username, passwd
end with
So here're my questions:
1)why first solution (on a book too is referenced as I made) did'nt worked?
2)OLEDB for oracle is dipendent from ODBC connection only? Can't I a way to
use directly OLEDB connected to Oracle Client without passing thru ODBC?
Thanks in advance, bye Giovanni.

.
 
 
 

Oracle OleDB and ADO Ora-12514

Post by Al Rei » Fri, 31 Oct 2003 21:28:03

An easy way to generate a connection string for any database.provider is to go to Windows Explorer and create a new text file.
Change the extension to UDL and double click on the file. Then configure the database connection as required. Open the udl file
using notepad and copy the connection string to the clipboard. Use this as the connection.ConnectionString. The following is an
example connection string to an oracle database:

"Provider=MSDAORA.1;Password=pass;User ID=MyUserID;Data Source=MyDataSource;Persist Security Info=True"

Of course, the oracle client tools must be installed and the SQL*NET properly configured. You can look at the TNSNames.ora file
with notepad to see what services have been configured.

I hope this helps.

"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain

 
 
 

Oracle OleDB and ADO Ora-12514

Post by Al Rei » Fri, 31 Oct 2003 23:08:56

hat I gave you was a DSNless connection, which does not require configuring a DSN configuring an ODBC Data source. On the client
machine, the Oracle Client and MS Data Access components (mdactyp.exe) must be installed. I don't recall ever specifically
installing an ODBC Driver.

"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain

"Giovanni" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ...