Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MySQL Connect Problem
Message
De
24/11/2014 10:29:20
 
 
À
24/11/2014 10:22:35
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:
01611356
Vues:
34
>>>>>>>>
>>>>>>>>This is a Windows 2008 R2 64 bit server.
>>>>>>>
>>>>>>>(1) your connectionstring seems to be missing a semicolon after lcPassword
>>>>>>>(2) see whether you have the 3.5 drivers under 64 bit odbc
>>>>>>>(3) try to connect (set up a dsn) via 64 bit odbc
>>>>>>>
>>>>>>>The connection string for 5.3 is different http://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-connection-without-dsn.html
>>>>>>
>>>>>>Hi Gregory,
>>>>>>
>>>>>>I ran the ODBCAD32.exe again and was just experimenting with different settings to see different error messages. I changed the port from the default 3306 to 3307 and voila it connected OK - "connection successful". So I have the right username/password and now the right port. So that works. But from VFP it does not. I keep getting a "Data source name not found and no default driver specified".
>>>>>>
>>>>>>I have change the code to add the semi-colon after the password. And changed the MySQL driver name as per the example.
>>>>>>
>>>>>>
>>>>>>lcStringConn = "Driver={MySQL ODBC 5.3 Driver}"  + ";" + ;
>>>>>>               "Port="     + lcPort              + ";" + ;
>>>>>>               "Server="   + lcServer            + ";" + ;
>>>>>>               "Database=" + lcDatabase          + ";" + ;
>>>>>>               "Uid="      + lcUser              + ";" + ;
>>>>>>               "Pwd="      + lcPassWord          + ";" + ;
>>>>>>               "option=3"                        + ";"
>>>>>>
>>>>>>
>>>>>>But it still fails. Could it be a VFP/32bit vs. MySQL 64bit driver issue?
>>>>>
>>>>>
>>>>>If it works with ODBCAD32.exe, I think vfp can handle that
>>>>>
>>>>>Can you specify a database in ODBCAD32.exe and see whether that is ok ?
>>>>
>>>>Gregory, so I got that User DSN created with the database. But I still cant get this to work in VFP. I think the driver parameter is wrong but I cannot find out what it should be. Is there a way to find it out via the MySQL Workbench program? The contractor installed that on the server and I have access to it. Seems to be MySQL version 5.1.73. But I cant find a driver description to use.
>>>
>>>Did you try connecting to the DSN with VFP?
>>
>>Hi Bill, how do I do that?
>
>Jos
>
>This will connect to SQL Server.
>I haven't tried it with mysql.
>
>gc_sqlconnect is the DSN
>
>
>
> *-- 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.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform