设置好驱动并连接到MySql数据库,在foxtable中引用MySql.Data.dll(可以到官方下载最新的for .net组件),在foxtable中直接用MySqlCommand执行sql语句操作MySql数据库
Dim cn As New MySql.Data.MySqlClient.MySqlConnection cn.C cn.Open()
Dim cmd As MySql.Data.MySqlClient.MySqlCommand = cn.CreateCommand()
cmd.CommandText = "insert into foxtest.test(aa,bb) value(2,'aa2')" cmd.ExecuteNonQuery()