the data type in the data base for the field order number is varchar 50.
on the page i have a session variable like so to grab the ordernumber
Session("id") = Session("ordernumber")
now when i want to query/update the database like so,
Dim sql1 As String = "update DDR set registrar = 1 where ccid = " & ds.Tables(0).Rows(0).Item("ccid") & " and ordernumber = " & Session("id")
if the data for the field ordernumber has 756 in the database just the number with out any special type character this works fine.
but one of the rows has the data like 12345-69 and i get the following error which is very obvious. but i can't fix the syntax. I am still on the learning curve. please help me with this. Thanks.
Syntax error converting the varchar value '13706-69' to a column of data type int.
on the page i have a session variable like so to grab the ordernumber
Session("id") = Session("ordernumber")
now when i want to query/update the database like so,
Dim sql1 As String = "update DDR set registrar = 1 where ccid = " & ds.Tables(0).Rows(0).Item("ccid") & " and ordernumber = " & Session("id")
if the data for the field ordernumber has 756 in the database just the number with out any special type character this works fine.
but one of the rows has the data like 12345-69 and i get the following error which is very obvious. but i can't fix the syntax. I am still on the learning curve. please help me with this. Thanks.
Syntax error converting the varchar value '13706-69' to a column of data type int.