我想使用选择查询从数据库 amsdb.mbd 中检索用户密码,表名“user”
这是连接字符串
conaccess.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Documents and Settings\shirish\Desktop\AMS\New Folder\ams\ams\amsdb.mdb"
conaccess.Open()
这是我使用的查询:
Dim selcmd As New OleDbCommand("SELECT pwd FROM user WHERE uid = '" & ComboBox1.SelectedText & "'", conaccess)
Dim pwd1 As String
pwd1 = selcmd.ExecuteNonQuery()
但这给了我一个错误
FROM 子句中的语法错误。
任何更正或建议?