Connectionstring problem

E

EMW

This is my connectionstring on a Oracle database:

con = New OdbcConnection("Driver={SQL server};Server=MyPC;Persist Security
info=False;Trusted_Connection=yes;DATABASE=FieldSup;")

When I want to connect I get exception error 42000 microsoft logon failed.

How can I solve this?
Do I have to pass on the user and password strings?

rg,
Eric
 
W

William Ryan eMVP

EMW:
If you are trying to connect to Oracle, the Replace the {SQL Server} with
this {Microsoft ODBC for Oracle};

However, your whole connection string looks like the one used for SQL
Server, try the Oracle connection string (From www.connectionstrings.com)

a.. New version:

"Driver={Microsoft ODBC for
Oracle};Server=OracleServer.world;Uid=Username;Pwd=asdasd;"



a.. Old version:

"Driver={Microsoft ODBC Driver for
Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;"
 
E

EMW

thanks, that site helped.

I now use:

Dim con As OracleConnection
con = New OracleConnection("Data Source=Oracle9i;Integrated Security=yes")

But I get this message:

ORA-12154: TNS: servicename could not be resolved

What does this mean?
 
E

EMW

Thats what I found in the docs....but I use now:

Dim con As OracleConnection
con = New OracleConnection("Data Source=Oracle9i;Integrated Security=yes")

to get an error message:

ORA-12154: TNS: servicename could not be resolved

Can you tell me what this means?

rg,
Eric
 
W

William Ryan eMVP

All you want in the sqlnet.ora file is SqlNet.Authentication_Services=(NTS)
Get rid of the other stuff.

Try removing the DEFAULT DOMAIN param and Names.Directory_Path=(Tnsnames,
Onames, Hostname)

Let me know if you still have problems after doing this.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top