Error converting data type varchar to bigint

  • Thread starter Thread starter ri_montoya
  • Start date Start date
R

ri_montoya

Guest
hi,please i need help.

when i try to insert data on the sql database have this error message appear. "Error converting data type varchar to bigint."


this is the current Code:

oDataadapter1 = New SqlDataAdapter("Insert into dbo.batch values ('" + Trim(txtBatch_ID.Text) + "','" + Trim("Doccas Food - Spain") + "','" + Trim("ReportName") + "','" + Trim("2020-10-26 13:00:00") + "','" + Trim("Ricardo") + "','" + Trim("2020-10-26 13:00:00") + "','" + Trim("2020-10-26 13:00:00") + "','" + Trim("2020-10-26 14:00:00") + "','" + "10" + "','" + "Test" + "','" + "1500.0" + "','" + "1510.0" + "','" + "1" + "','" + "4" + "','" + "200" + "','" + "210" + "','" + "2" + "','" + "3" + "','" + "0" + "," + "')", CC)
Dim oCmd1 As SqlCommandBuilder = New SqlCommandBuilder(oDataadapter1)
odataset1 = New DataSet
oDataadapter1.Fill(odataset1, "batch")


The data that generates the error is the number 19, (marked with bold, in the code there is a "0" to test)

Continue reading...
 
Back
Top