qq飞车开永久雷诺2017:关于在vb里,用ado修改数据的问题~~~

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 12:47:15
代码如下,这个是用来修改数据库里的数据的,主要是修改两个表了,前一个是学生信息表,可以修改,可是后面一个是用户表,死活修改不了,到那就会出现错误,ado form语句错误,什么意思啊??
BeginTrans

Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "学生信息"
Adodc1.Refresh

Adodc1.Recordset.AddNew
Adodc1.Recordset!学号 = TextNum.Text
Adodc1.Recordset!姓名 = TextName.Text
If OptionM.Value Then
Adodc1.Recordset!性别 = "男"
Else
Adodc1.Recordset!性别 = "女"
End If
Adodc1.Recordset!出生年月 = TextTime.Text
Adodc1.Recordset!专业 = TextSub.Text
Adodc1.Recordset!学院 = TextX.Text
Adodc1.Recordset!宿舍 = TextS.Text
Adodc1.Recordset!班级 = TextC.Text
Adodc1.Recordset!家长姓名 = TextFN.Text
Adodc1.Recordset!家庭住址 = TextHome.Text
Adodc1.Recordset!邮政编码 = TextHN.Text
Adodc1.Recordset!电话号码 = TextP.Text
Adodc1.Recordset.Update

Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "User"
Adodc1.Refresh

Adodc1.Recordset.AddNew
Adodc1.Recordset!用户ID = TextNum.Text
Adodc1.Recordset!用户密码 = TextNum.Text
Adodc1.Recordset!用户身份 = "学生"
Adodc1.Recordset.Update

CommitTrans