lnConnection = SQLSTRINGCONNECT("DRIVER={MySQL ODBC 5.1 Driver};" + ; "UID=root;" + ; "PWD=password;" + ; "server=192.168.0.100;" + ; "port=3333") =SQLSETPROP(lnConnection,'ConnectTimeOut',0) =SQLSETPROP(lnConnection,'QueryTimeOut',0) =SQLSETPROP(lnConnection,'ConnectTimeout',0) =SQLSETPROP(lnConnection,'IdleTimeOut',0) =SQLSETPROP(lnConnection,'QueryTimeOut',0)Then you can use SQLEXEC to do the SQL statements:
=SQLEXEC(lnConnection,"CREATE DATABASE MyDatabase;") =SQLEXEC(lnConnection,"Use MyDatabase;") =SQLEXEC(lnConnection,"CREATE TABLE NewTable (Field1 Character(10))") =SQLEXEC(lnConnection,"Describe NewTable") =SQLEXEC(lnConnection,"Insert into NewTable (Field1) VALUES ('test')") =SQLEXEC(lnConnection,"SELECT * FROM NewTable")You need to install the ODBC driver before you can create the connection, and the user root must accept connections from your IP.