vb6.0怎么接数据保存到数据库中
1个回答
展开全部
往aa。mdb数据库里的ss表的x列添加text1里的内容
Dim conn As New ADODB.Connection
Private Sub form_load()
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\aa.mdb;", "admin"
Command1.Caption = "保存"
End Sub
Private Sub command1_click()
conn.Execute "insert into ss (x) values ('" & Text1.Text & "')"
End Sub
修改回答
Dim conn As New ADODB.Connection
Private Sub form_load()
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\aa.mdb;", "admin"
Command1.Caption = "保存"
End Sub
Private Sub command1_click()
conn.Execute "insert into ss (x) values ('" & Text1.Text & "')"
End Sub
修改回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询