2017-03-26 122 views

回答

1
Dim Conn As New ADODB.Connection 
Conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & server & ";DATABASE=" & database & ";UID=" & user & ";PWD=" & pass & ";PORT=" & port & ";" 
Conn.Open() 
Conn.Execute("insert into tblname (fld1,fld2) values('"& textVal &"',"& numericVal &")") 
Conn.Close() 
Conn = Nothing 

粘貼.vb文件並編輯connectionstring &插入字符串。 祝你好運..

+0

而;添加COM參考Microsoft ActiveX數據對象6.x庫 – Emre

相關問題