Incorrect syntax near ','

hi guys

i am getting this error incorrect syntax near ‘,’ when i try to insert row in sql database through vb.net. the same command works for all tables but i get error in this. please help. its urgent.

Dim cmd1 As New SqlCommand
 cmd1 = New SqlCommand("insert into finstock(finstkcode,orderno,linenb,productcode,description,totmakcharge,stockdate,stkfor,designcode,diacolor,diashape,diapurity,stoneshapecode,karatcode,stonepcs,stonecode,gramwtgld,gramwtslvr,karattype,diapcs) values('" & fin & "'," & dsor.Tables(0).Rows(0).Item(0) & "," & dsor.Tables(0).Rows(0).Item(1).ToString & ",'" & dsor.Tables(0).Rows(0).Item(14) & "','" & txtdec.Text & "','" & txtmak.Text & "','" & stkdate.Text & "','" & str & "','" & dsor.Tables(0).Rows(0).Item(2) & "','" & dsor.Tables(0).Rows(0).Item(6) & "','" & dsor.Tables(0).Rows(0).Item(8) & "','" & dsor.Tables(0).Rows(0).Item(7) & "','" & dsor.Tables(0).Rows(0).Item(9) & "','" & dsor.Tables(0).Rows(0).Item(11) & "'," & dsor.Tables(0).Rows(0).Item(12) & ",'" & dsor.Tables(0).Rows(0).Item(10) & "'," & dsor.Tables(0).Rows(0).Item(4) & "," & dsor.Tables(0).Rows(0).Item(5) & "," & dsor.Tables(0).Rows(0).Item(3) & "," & dsor.Tables(0).Rows(0).Item(13) & "')", con)

That is quite a long query. There is probably a missing ’ somewhere. I would suggest wrapping everything in '. To make sure you are not putting text somewhere that a number is expected

From dsor.Tables(0).Rows(0).Item(4)…on, your missing a '. Just glanced however.

i have a great idea… assign that stuff to a string variable, and echo the variable just before executing it

You can do it the easy way, but where is the fun in that?

Sometimes the hard way will teach you more lessons, then learning it the easy way.

Same way as telling people to build the most complicated solution they can think of, in order to become a better developer