Posted on 2005-05-11
I'll try to explain this the best I can. I have a table named "Batches" that I'm trying to insert into one row of data at a time. In VB.NET I have a dropdown box that displays a number from another column "Code" from another table "Products". Inside the "Products" table is a column named "ProductID" which corresponds with the Products.Code column. Here is an example:
I am trying to insert the ProductID number into "Batches.Product" column.
In VB.NET my dropdownbox is called "product" and displays the Code from "Products.Code". My question is, how do I insert into Batches.Product the "ProductID" corresponding with the "Code".
This is what I have so far, but I know it's incomplete:
INSERT INTO Batches (Product)
Values ('" & product.selectedItem.Text & "')"