| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to connect oracle using ADO
ps2cheung_at_yahoo.com wrote:
>
> Thanks to Rob,
>
> my problem is solved
>
> ------------------- solution from Rob McEwan -------------------
>
> I saw your newsgroup posting. Try this:
>
> con.connectionstring="uid=UUUU;pwd=PPPP;server=(DESCRIPTION = (ADDRESS
> =
> (PROTOCOL = TCP) (HOST = HHHH) (PORT=1521)) (CONNECT_DATA = (SID =
> ZZZZ)));driver={Microsoft ODBC for Oracle}"
>
> Where:
> UUUU = Oracle username
> PPPP = Password
> HHHH = Host DNS name or IP address (assuming you are using TCP/IP
> connections).
> ZZZZ = Oracle Intance name
I would, however, STRONGLY suggest that you use a database alias in tnsnames.ora rather than putting the entire sqlnet v2 connect string directly into your code. If you use the solution given above then if anything ever changes that would effect the sqlnet connect string you would have to go back and make changes to your code. If you use an alias then any changes to tnsnames.ora would be picked up the next time that you run the program. Received on Wed Nov 17 1999 - 07:29:11 CST
![]() |
![]() |