Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ODBC connect VB - Oracle 7
Pierre Gagnon wrote:
>
> I'm trying to connect to an Oracle 7 database with VB, I used the following
> code in my form Load procedure
> The OraLink DSN is a System DSN I've got in Win98
>
> Set mCon = New ADODB.Connection
>
> 'sConnStr = "DSN=OraLink;UID=pkdb726;PWD=pkdb726;"
> 'sConnStr = "UID=pkdb726;PWD=pkdb726;DRIVER={Oracle ODBC
> Driver};SERVER=spooky;"
> 'sConnStr = "Provider=MSDAORA.1;UserID=pkdb726;DataSource=spooky;Persist
> Security Info = False;"
> 'sConnStr = "ODBC;DATABASE=pkdb726;UID=pkdb726;PWD=pkdb726;DSN=OraLink;"
>
> sConnStr = "DSN=OraLink;DBQ=spooky;UID=pkdb726;PWD=pkdb726;"
>
> mCon.Provider = "MSDAORA.1"
>
> mCon.Open sConnStr
>
> I get this error:
>
> ORA-12203 : TNS : Unable to connect to destination
>
> -- - Direction or suggestions would be appreciated
Have you tested the DSN? Have you tested the "spooky" data source? It looks like your database alias in tnsnames.ora is not set up properly. Received on Mon Feb 28 2000 - 09:09:17 CST
![]() |
![]() |