Hi Wong,
CON=SQLCONNECT("DRIVER=MySQL ODBC 3.51 Driver;
SERVER=169.254.136.185;UID=ddd;PWD=;DATABASE=eee")
IF CON>0
? "OK"
=SQLEXEC(CON,"SELECT * FROM FFF","TEMP")
SELE TEMP
BROW
ELSE
AERROR(xxa)
?xxa(1)
?xxa(2)
ENDIF
1) Why Error message in second cell of array xxa?
2) Have user ddd access allowed from your IP?
3) Have user ddd access allowed to databas eee?
4) Why don't you use key DB instead DATABASE?
5) Why don't you use key OPTION (see at readme file for odbc driver)
6) Why don't specify port: PORT 3306? Or port on server is 3306?
MartinJ
>Hi,
>
>I am a new guy in programming with MySQL
>
>i had install MySQL and ODBC into my computer
>I can successful to connect with MySQL when setting in ODBC USER Conf.
>Then i back to VFP command, and coding as below :-
>
>*****
>CON=SQLCONNECT("DRIVER=MySQL ODBC 3.51 Driver;
> SERVER=169.254.136.185;UID=ddd;PWD=;DATABASE=eee")
>IF CON>0
> ? "OK"
> =SQLEXEC(CON,"SELECT * FROM FFF","TEMP")
> SELE TEMP
> BROW
>ELSE
> ? "ERROR"
>ENDIF
>*****
>
>I can not connect to MySQL in program ?