Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC32 Issue
Message
 
À
11/08/2016 02:33:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Network:
Windows Server 2008 R2
Database:
Oracle
Application:
Desktop
Virtual environment:
Hyper-V
Divers
Thread ID:
01639323
Message ID:
01639377
Vues:
120
>>>>I'm having a strange behavior with VFP9sp2
>>>>
>>>>Using VFP front end to communicate with Oracle 9i database
>>>>
>>>>When creating DSN in ODBC32, connection is successfull with both ORACLE ODBC driver is 9.02 and Microsoft for Oracle 6.01.7601.19135
>>>>
>>>>When compiling VFP EXE. The Application works! It connects to Oracle.
>>>>
>>>>Here is the weird part....
>>>>
>>>>When running the app within VFP9, the ODBC dialog appear asking for password and every time it fails to give a handle
>>>>
>>>>I've tried SQLConnect() and SQLStringConnect(), same behavior with both OCBC32 drivers.
>>>>
>>>>So, I'm unable to debug and every time I want to test I need to compile.
>>>>
>>>>Any Clue how to resolve this odd behavior?
>>>
>>>With ODBC errors, AERROR( ) usually contains information useful for debugging. If you call it after an ODBC error, you can view the contents of the array, write the contents out to a file with STRTOFILE( ) etc.
>>
>>The AERROR( ) is : "Connectivity error: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
>>But it is not true, it Works if compiled or going with the ODBC interface or with TOAD...
>
>There are some useful-looking hits if you Google [ORA-12154: TNS:could not resolve service name].
>
>With an ODBC error there are usually 4 or 5 rows in AERROR( ). Could you post them all, verbatim?
>
>An excellent resource for connection strings is http://www.connectionstrings.com . You can check that you have all required/recommended parameters in your strings. Also check that you don't have any typos in the parameters.

Here is the AERROR list
LATEST Pub A
( 1, 1) N 1526 ( 1526.00000000)
( 1, 2) C "Connectivity error: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
"
( 1, 3) C "[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
"
( 1, 4) C "08004"
( 1, 5) N 12154 ( 12154.00000000)
( 1, 6) N 1 ( 1.00000000)
( 1, 7) C .NULL.
( 2, 1) N 1526 ( 1526.00000000)
( 2, 2) C "Connectivity error: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
"
( 2, 3) C "[Microsoft][Gestionnaire de pilotes ODBC] Échec SQLSetConnectAttr du pilote"
( 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: [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve service name
"
( 3, 3) C "[Microsoft][Gestionnaire de pilotes ODBC] Échec SQLSetConnectAttr du pilote"
( 3, 4) C "IM006"
( 3, 5) N 0 ( 0.00000000)
( 3, 6) N 1 ( 1.00000000)
( 3, 7) C .NULL.

Like I mentioned earlier, if compiled it works. It's not about connection string...
It doesn't work when I'm in the VFP GUI. I went thru all what I found on the net concerning error: ORA-12154


- If the path of VFP contains ...\Program file (x86)\...
- Multi oracle Home...
- Same DSN name in ODBC32 and 64
- Access rights
- space in the service name

I thing it has to do with the file: Sqlnet.ora
The Oracle client installed is a third party software that uses only the TNSNAMES.ORA file. They didn't provide/install the SQLNET.ORA file


Here is the TNSNAMES.ORA
FAMOUS =
(DESCRIPTION =
(SDU = 2048)
(TDU = 2048)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 11.101.5.18)(PORT = 1521))
)
(CONNECT_DATA =
(SID = famous)
)
)
Luc Nadeau
lnadeau@neova.ca

"the theory, it is when all is known and that nothing works. The practice, it is when all works and that nobody knows why." - Albert Einstein (Nobel of physique 1921)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform