Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MySQL Connect Problem
Message
De
24/11/2014 11:02:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611335
Message ID:
01611364
Vues:
80
>>>
>>> *-- Connect to  Server
>>>  gnConnHandle = SQLCONNECT(gc_sqlconnect, gc_sqluser,gc_sqlpasswd)
>>>
>>>IF gnConnHandle > 0
>>>    * you are connected
>>>ELSE
>>>      
>>>   * you are not connected
>>> ENDIF
>>>
>>>
>>>
>>
>>Thanks Bill, I did try that. I was hoping you had a clever alternative :) Very weird this problem. Seems to me that VFP cannot find the right driver even though I have tried every variation I can think of for the connection string. I am wondering if its a 32bit/64bit thing but before installing new stuff on the server I thought it best to get some feedback.
>
>Are you running 32 bit version of ODBC to create the DSN? You need to use 32 bit version to create DSN. If you get that 32 bit version to work, then you should specify that DSN in the connection string and it should work.

Hi Naomi.

This was the problem. Had a suspicion it might have been all along. The contractor had installed the 64 bit ODBC version but VFP cannot access it. So I took a chance and installed the 32bit version. It now works correctly. The code with the connection string for MySQL ODBC version 5.3 is:
lcStringConn = "Driver={MySQL ODBC 5.3 ANSI Driver}"  + ";" + ;
               "Server="   + lcServer                 + ";" + ;
               "Port="     + lcPort                   + ";" + ;
               "Database=" + lcDatabase               + ";" + ;
               "User="     + lcUser                   + ";" + ;
               "Password=" + lcPassWord               + ";" + ;
               "Option=3"             
Many thanks Gregory and Dragan as well.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform