'Define the connection
Dim dbconnection As New OleDbConnection("provider=sqloledb;server=(local);database=thardata; uid=sa;pwd=tharSQL")
'Define the querystring
Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & Request.QueryString("JobNo"), dbconnection)
'Create a dataset and fill with data
Dim ds As New DataSet()
dbquerystring.Fill(ds, "joblist")
'Bind the data to the asp
jobinfo.DataSource = ds
jobinfo.Databind()
The jobno in the SQL database is a varchar(32). When I run the page says Syntax error converting the varchar value '10006.01' to a column of data type int.
Who do I convert the querystring?
Dim dbconnection As New OleDbConnection("provider=sqloledb;server=(local);database=thardata; uid=sa;pwd=tharSQL")
'Define the querystring
Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & Request.QueryString("JobNo"), dbconnection)
'Create a dataset and fill with data
Dim ds As New DataSet()
dbquerystring.Fill(ds, "joblist")
'Bind the data to the asp
jobinfo.DataSource = ds
jobinfo.Databind()
The jobno in the SQL database is a varchar(32). When I run the page says Syntax error converting the varchar value '10006.01' to a column of data type int.
Who do I convert the querystring?