ds.Clear()
connString = provider & datafile
con.ConnectionString = connString
con.Open()
sqlstatement = "SELECT * FROM CustomerInfo WHERE ID = '" & UserbeingEdited & "'"
ds.Clear()
da = New OleDb.OleDbDataAdapter(sqlstatement, con)
da.Fill(ds, "EDITING")
con.Close()
Dim recordCount, x As Short
recordCount = 0
x = 0
recordCount = ds.Tables("EDITING").Rows.Count
我在编辑数据库中的用户时遇到问题。这是EditUser表单加载时的代码。发生错误。请帮忙!
答案 0 :(得分:0)
sqlstatement = "SELECT * FROM CustomerInfo WHERE ID = " & UserbeingEdited
请删除"'"
并使用上面的代码。