首页上一页 1 下一页尾页 1 条记录 1/1页
数据库
发表在VB答疑区
2010-09-17
是否精华
是
否
版块置顶:
是
否
Private Sub Command1_Click()
Dim ADOrs As New Recordset
Dim strAccess As String
Dim strÐÔ±ð As String
ADOrs.ActiveConnection = ADOcn
ADOrs.Open "select 学号 from 学生
If Not ADOrs.EOF Then
MsgBox”存在”.1+32
Else
If Option1.Value Then
Str性别=“男”
Else
Str性别=“女”
End If
rtrAccess = "insers into 学生(学号,姓名,性别)“
rtrAccess = rtrAccess + " values('" + Text1 + "','"
rtrAccess = rtrAccess + Text2 + "','" + str性别+ "')"
ADOcn.Execute strAccess
MsgBox "已添加新记录"
End If
End Sub
怎么显明没有为命令对像设置命令????
Dim ADOrs As New Recordset
Dim strAccess As String
Dim strÐÔ±ð As String
ADOrs.ActiveConnection = ADOcn
ADOrs.Open "select 学号 from 学生
If Not ADOrs.EOF Then
MsgBox”存在”.1+32
Else
If Option1.Value Then
Str性别=“男”
Else
Str性别=“女”
End If
rtrAccess = "insers into 学生(学号,姓名,性别)“
rtrAccess = rtrAccess + " values('" + Text1 + "','"
rtrAccess = rtrAccess + Text2 + "','" + str性别+ "')"
ADOcn.Execute strAccess
MsgBox "已添加新记录"
End If
End Sub
怎么显明没有为命令对像设置命令????