mysql – odbc驱动程序不支持请求的属性

当我们在最后一行运行程序时,odbc驱动程序不支持请求的属性错误任何人都可以请给我一个想法.

Dim conn As New ADODB.Connection
Dim rsRec As ADODB.Recordset
Dim cmd As ADODB.Command
Dim query As String

Set conn = New ADODB.Connection
Set rsRec = New ADODB.Recordset

conn.connectionString = "DRIVER={MySQL ODBC 3.51 Driver}; Server=127.0.0.1 ;Database=try;User=root;Password=root;"

conn.Open

query = "INSERT INTO user_table (Name)"
query = stSQL & "VALUES (Anupam)"

rsRec.Open query, conn, adOpenDynamic, adLockOptimistic

解决方法:

试试这个:-

Dim conn As New ADODB.Connection
Dim rsRec As ADODB.Recordset
Dim cmd As ADODB.Command
Dim query As String

Set conn = New ADODB.Connection
Set rsRec = New ADODB.Recordset

conn.connectionString = "DRIVER={MySQL ODBC 3.51 Driver}; Server=127.0.0.1 ;Database=try;User=root;Password=root;"

conn.Open

query = "INSERT INTO user_table (Name) VALUES (Anupam)"

rsRec.Open query, conn, adOpenDynamic, adLockOptimistic
上一篇:【HANA系列】SAP 【第二篇】EXCEL连接SAP HANA的方法(ODBC)


下一篇:c# – MySQL ODBC存储过程结果缺少列