工程->引用->Microsoft ActiveX Data Objects 2.5 Library
表名 b,字段c
Private Sub Command1_Click()
Dim cnDk As New ADODB.Connection
Dim strDk As String
Dim rDk As New ADODB.Recordset
Dim sql As String
strDk = "driver=;server=(local);uid=sa;pwd=123456;database=a" '这个字符串要改成你需要的
' 上有各种连接字符串的查询
cnDk.Open strDk
sql = "insert into b (c) values ('" & text1.text & "')"
cnDk.Execute sql
cnDk.Close
Set cnDk = Nothing
End Sub
工程->引用->Microsoft ActiveX Data Objects 2.5 Library
表名 b,字段c
Private Sub Command1_Click()
Dim cnDk As New ADODB.Connection
Dim strDk As String
Dim rDk As New ADODB.Recordset
Dim sql As String
strDk = "driver=;server=(local);uid=sa;pwd=123456;database=a" '这个字符串要改成你需要的
' 上有各种连接字符串的查询
cnDk.Open strDk
sql = "insert into b (c) values ('" & text1.text & "')"
cnDk.Execute sql
cnDk.Close
Set cnDk = Nothing
End Sub
另外,虚机团上产品团购,超级便宜