Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset
Private Sub Command1_Click()
con.Open "Driver=sql server;Server=date99;Database=test;uid=;Pwd=;"
rec.Open " insert into db VALUES ('" & Text1.Text & "','" & Text2.Text & "') "
rec.Close
con.Close
End Sub
Dim con As New ADODB.Connection
Dim rec As New ADODB.Recordset
Private Sub Command1_Click()
con.Open "Driver=sql server;Server=date99;Database=test;uid=;Pwd=;"
rec.Open " insert into db VALUES ('" & Text1.Text & "','" & Text1.Text & "') ", con
con.Close
End Sub