Im tryin to develop a shopping application so that a user can select checkboxes of items they wish to order then click on an order button. Once they have clicked on the order button if the checkbox is checked then i want it to write the name of the checkbos plus ut's associated price and quatitiy (textbox1 and texbox3 in the code). Below is the ocde associated with my order button. It compiles ok and runs without any errors but when i check the database it hasn't entered any of the details. Any one know why?
If Chicken.CheckState = 1 Then
cnPurchases.Open()
SQLPurchases.Connection = cnPurchases
SQLPurchases.CommandText = "INSERT INTO Purchases " & "(Item, Price, Quantity)" & "Values (" & Chicken.Text & ", " & TextBox1.Text & ", " & TextBox3.Text & ")"
cnPurchases.Close()
End If
Thanks
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).