Re: Help Constructing INSERT
Moved From The CodeBank (which is for sharing code rather than posting questions :) )
Re: Help Constructing INSERT
Code:
Dim New_UPC As String
:
:
sql = "SELECT U_size FROM SIZERUNS WHERE U_run = " & TextBox2.Text
insertsql = "INSERT INTO RUNSIZEUPCS (Code,Name,U_item,U_size,U_upc)
VALUES(Code_manip, New_Name, " & TextBox1.Text & ", " & dsin.Tables(0).Rows(i).Item(0) & New_UPC & ")"
'Connection = New SqlConnection(ConnectionString)
you declared the variable alright but forgot to initialized/put value in it before using. try to put something in New_UPC prior to using it.
Re: Help Constructing INSERT
Thank you for looking at it. I figured out what was going on just a bit ago.
Re: Help Constructing INSERT
Please post your solution. It could help others with the same or similar problem.
Also, as a newer member I ask that if you consider your question to be resolved please help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.
Thank you. :)