Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can not connect ?
Message
 
To
20/09/2004 04:38:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00943920
Message ID:
00978407
Views:
21
Noticed your question about MySql did you ever get it to work?

I'm trying to connect to MYSql on a Linux server with no luck.

This causes VFP8 and VFP9 to crash with a Fatal Execption Error.
lcdsnless =;
"DRIVER={MySQL ODBC 3.51 Driver};" +;
"SERVER=" + '192.168.1.100' + ";" +;
"UID=" + 'rileys' + ";" +;
"PASSWORD=" + 'bingo'+ ";" +;
"DB=" + 'test' + ";" +;
"PORT=3306;" +;
"SOCKET=;" +;
"OPTION=" + TRANSFORM(1+4+8+64+512+1024+2048+16384+524288) + ";" +;
"STMT;"
wait lcdsnless window
gn=SQLSTRINGCONNECT(lcDSNLess)
IF gn > 0
WAIT 'OK!'
cancel
? SQLTABLES(lnHandle,"TABLES")
browse last nocaptions
SQLDISCONNECT(lnHandle)
ELSE
=AERROR(laError)
MESSAGEBOX("Error at Connecting"+CHR(13)+;
"Description:"+laError[2])
ENDIF

The wait executes to confirm my settings and then when sqlstringconnect executes VFP halts.
I tried using:

gn=sqlconnect('mysql','rileys','bingo')

and I get "Could not determine the driver so could not lookup the setup library" in the odbc error string.

When I test the connection using the ODBC admin in XP it tests fine and I can connect to the database using mysql browser so I think my connection to the server and database is not the issue.
Previous
Reply
Map
View

Click here to load this message in the networking platform