Hi Everyone,
I am currently Working on a School Project which has the form of a stock update System. I am using an access 2007 DB and building my code in Visual Studio 2010. I am trying to get an Update Query to work and I am completely unsure on how to go about it.... Here is what I have so far.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New OleDbConnection
Dim cmd As New OleDbCommand
Dim Query As String
Query = "update Prod_DB_Laminate_Raw set [Stock Level] = '" & TextBox1.Text & "where Laminate = " & ComboBox1.Text & ""
con.Open()
cmd = New OleDbCommand(Query, con)
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
End Sub
Is this the correct way of doing this or am I looking at the wrong thing entirely?
Many Thanks
Ziggy