Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27356

Syntex Error, missing Oparetor in select statement

$
0
0
Hi
I am having problem locating, syntax error in the select statement, could some help out thanks
The code runs fine without the Where clause but once I add the where clause it throws an exception at the following line of codes, Please help
Quote:

Dim dataAdapter As New OleDb.OleDbDataAdapter("SELECT EmpID,LastName,FirstName FROM EmployeeTbl where LastName = & txtLastName.Text' &", connectionstring)
dataAdapter.Fill(ds, "EmployeeTbl") <<Syntax error (missing operator) in query expression 'LastName = & txtLastName.Text' &'. DataGridViewCheckEmployee.DataSource = ds.Tables(0)

Viewing all articles
Browse latest Browse all 27356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>