SQL querystring syntax error

CookieNZ

Member
Joined
Nov 24, 2005
Messages
17
Programming Experience
Beginner
Dim jobnumber As String = Request.QueryString("JobNo")


Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & "'jobnumber'", dbconnection)

Doesn't seem to load the right data and I am sure I have got the wrong syntax.
 
Try this:

VB.NET:
Dim dbquerystring AsNew OleDbDataAdapter("select * from mainjobdetails where jobno='" & jobnumber & "'", dbconnection)

-tg
 
Back
Top