Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: dsn less connection
>
> I have this vba code that connects to an oracle like:
>
> oConn.Open "Driver={Oracle ODBC Driver};" & _
> "ConnectString=MYSERVER;" & _
> "Uid=myUsername;" & _
> "Pwd=myPassword"
>
> When I passed it out to some users it errored out because "MYSERVER" was not
> in their tnsnames.ora file.
>
> How do I specify a dsn string where all this information is contained in the
> connection?
I tried this:
cmd.ActiveConnection =
"
Driver={Microsoft ODBC for Oracle};
Host=myhost;
Port=1526; // also tried 1521 SID=mysid; UID=myuid;
I am getting an error:
"Driver's SQLSetConnectAttr failed"
I specified the 2 key items from the tnsnames.ora file, Host and Port.
I'd need to NOT have to make an entry in tnsnames.ora because many users won't be able to do this.
Mike Received on Thu Mar 18 2004 - 12:14:25 CST
![]() |
![]() |