SELECT 语句包含拼写错误或缺失的保留字或参数名称,或者标点符号不正确.错误信息 [英] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect. Error Message
本文介绍了SELECT 语句包含拼写错误或缺失的保留字或参数名称,或者标点符号不正确.错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
非常感谢回答我问题的人.我很着急,所以我现在需要解决这个问题.
So much thanks to those who answer my question. I'm in a hurry so i need to work it out now.
这是另一个错误
代码如下:
Private Sub RefreshData()
If Not cnn.State = ConnectionState.Open Then
cnn.Open()
End If
Dim da As New OleDb.OleDbDataAdapter("SELECT txtID as [ID], " & _
"txtLName as [LastName], txtFName as [FirstName], txtMI as [MI] " & _
"txtGender as [Gender], txtDept as [Department], txtNo as [ContactNo]" & _
"txtAddress as [Address], txtEAdd as [EmailAddress], txtYear as [YearEmployed]", cnn)
Dim dt As New DataTable
da.Fill(dt)
Me.dgvProfessorList.DataSource = dt
cnn.Close()
End Sub
推荐答案
您的查询可能有误,并且您错过了逗号 (,) 来分隔列.应该是
Your Query might be wrong and you have missed Comma (,) to separate the Columns. It should be
Dim da As New OleDb.OleDbDataAdapter("SELECT [ID],[LastName],[FirstName],[MI],[Gender],[Department],[ContactNo],[Address],[EmailAddress],[YearEmployed] From ProfessorListTable", cnn)
这篇关于SELECT 语句包含拼写错误或缺失的保留字或参数名称,或者标点符号不正确.错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文