Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connecting to Oracle
Message
De
09/09/2004 10:25:53
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00940058
Message ID:
00940636
Vues:
32
Mark,

Thanks for the reply.

I have double checked the name of the driver and everything matches including case.

My first problem with using the Oracle driver was solved by adding:
'dbq=myserver;'
to the SQLSTRINGCONNECT() function in place of 'server=myserver;'

However, on another PC we can't connect to the Oracle database using either the MS or Oracle drivers.

I have tried the following and included the results below:
***Using the MS Driver.
=SQLSETPROP(0,"DispLogin",3)
oconn = SQLSTRINGCONNECT("driver=Microsoft ODBC for Oracle;uid=myid;pwd=manager;server=myserver;")
AERROR(laError)
DISP MEMO LIKE laError

***Results:
LAERROR     Priv   A  5fgo0517
   (   1,   1)     N  1526        (      1526.00000000)
   (   1,   2)     C  "Connectivity error: [Microsoft][ODBC driver f
                      or Oracle][Oracle]ORA-12535: TNS:operation tim
                      ed out"
   (   1,   3)     C  "[Microsoft][ODBC driver for Oracle][Oracle]OR
                      A-12535: TNS:operation timed out"
   (   1,   4)     C  "NA000"
   (   1,   5)     N  12535       (     12535.00000000)
   (   1,   6)     N  1           (         1.00000000)
   (   1,   7)     C  .NULL.
   (   2,   1)     N  1526        (      1526.00000000)
   (   2,   2)     C  "Connectivity error: [Microsoft][ODBC driver f
                      or Oracle][Oracle]ORA-12535: TNS:operation tim
                      ed out"
   (   2,   3)     C  "[Microsoft][ODBC Driver Manager] Driver's SQL
                      SetConnectAttr failed"
   (   2,   4)     C  "IM006"
   (   2,   5)     N  0           (         0.00000000)
   (   2,   6)     N  1           (         1.00000000)
   (   2,   7)     C  .NULL.
   (   3,   1)     N  1526        (      1526.00000000)
   (   3,   2)     C  "Connectivity error: [Microsoft][ODBC driver f
                      or Oracle][Oracle]ORA-12535: TNS:operation tim
                      ed out"
   (   3,   3)     C  "[Microsoft][ODBC Driver Manager] Driver's SQL
                      SetConnectAttr failed"
   (   3,   4)     C  "IM006"
   (   3,   5)     N  0           (         0.00000000)
   (   3,   6)     N  1           (         1.00000000)
   (   3,   7)     C  .NULL.
Thanks for your help,

Jerry



>Try it again with display logins set to never - SQLSETPROP(0,"DispLogin",3). Once the SQLSTRINGCONNECT fails, run the following from the command window:
>
>CLEAR
>AERROR(laError)
>DISP MEMO LIKE laError
>
>Then let us know what the error is. I see nothing wrong with your connect string as that is the format/syntax I use for Oracle except I have a different [newer] Oracle driver name.
>
>To make sure you are using the correct driver name, go to the ODBC Source in the Windows Control Panel or the Administrative Tools. Click the Drivers tab and find the Oracle ODBC drive. You must use that exact spelling and case for the Driver parameter in the connect string.
>
>>The SQLSETPROP() does stop the dialog from displaying but now I DON'T get a valid connection handle.
>>
>>I believe the problem is in my connection string. The following works if I use the MS driver. But it does not work with the Oracle driver. With the Oracle driver, a dialog asks for a Service name (which is blank in the dialog). If I type in 'myserver' into the dialog, I do get a valid connection. However, 'server=myserver;' already exists in the string.
>>
>>There must be a different setting I need when using the Oracle driver?
>>
>>myconn = SQLSTRINGCONNECT("driver=Oracle ODBC Driver;uid=myid;pwd=mypass;server=myserver;")
>>
>>How can I fix the above string to stop the dialog from appearing?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform