VB数据类型不匹配
Dimrs_xpAsNewADODB.RecordsetDimsqlAsStringsql="select*from用户资料whereid='"&Text14.Text&...
Dim rs_xp As New ADODB.Recordset
Dim sql As String
sql = "select * from 用户资料 where id='" & Text14.Text & "'"
rs_xp.CursorLocation = adUseClient
rs_xp.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_xp.Fields(1) = Text1.Text
rs_xp.Fields(2) = Text2.Text
rs_xp.Fields(3) = Text3.Text
rs_xp.Fields(4) = Text4.Text
rs_xp.Fields(5) = Text6.Text
rs_xp.Fields(6) = Text7.Text
rs_xp.Fields(7) = Text8.Text
rs_xp.Fields(8) = Text9.Text
rs_xp.Fields(9) = Text10.Text
rs_xp.Fields(10) = Text11.Text
rs_xp.Fields(11) = Text12.Text
rs_xp.Fields(12) = Text13.Text
rs_xp.Fields(13) = Text5.Text
rs_xp.Update
rs_xp.Close
MsgBox "修改成功!", vbOKOnly + vbExclamation, ""
Private Sub Form_Load()
Dim connectionstring As String
connectionstring = "provider=microsoft.jet.oledb.4.0;" & "data source=" & App.Path & "\data.mdb;persist security info=false;jet oledb:database password=110"
donn.Open connectionstring
End Sub
提示数据类型不匹配.
是实时错误'-2147217913(80040e07)
标准表达式中数据类型不匹配.
我数据库里面全是文本啊.. 展开
Dim sql As String
sql = "select * from 用户资料 where id='" & Text14.Text & "'"
rs_xp.CursorLocation = adUseClient
rs_xp.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_xp.Fields(1) = Text1.Text
rs_xp.Fields(2) = Text2.Text
rs_xp.Fields(3) = Text3.Text
rs_xp.Fields(4) = Text4.Text
rs_xp.Fields(5) = Text6.Text
rs_xp.Fields(6) = Text7.Text
rs_xp.Fields(7) = Text8.Text
rs_xp.Fields(8) = Text9.Text
rs_xp.Fields(9) = Text10.Text
rs_xp.Fields(10) = Text11.Text
rs_xp.Fields(11) = Text12.Text
rs_xp.Fields(12) = Text13.Text
rs_xp.Fields(13) = Text5.Text
rs_xp.Update
rs_xp.Close
MsgBox "修改成功!", vbOKOnly + vbExclamation, ""
Private Sub Form_Load()
Dim connectionstring As String
connectionstring = "provider=microsoft.jet.oledb.4.0;" & "data source=" & App.Path & "\data.mdb;persist security info=false;jet oledb:database password=110"
donn.Open connectionstring
End Sub
提示数据类型不匹配.
是实时错误'-2147217913(80040e07)
标准表达式中数据类型不匹配.
我数据库里面全是文本啊.. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询