hey guys im currently working on a project for college. (USING VB)
wat the form im working on does, allows the user to enter an ID of a customer and this then displays the customers details the user can then change the details however they want and update them which then saves the changes into a database. But i keep getting a syntax error in the following update statement.
EditCustomerTable.Clear() EditCustomerConnection.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=G:\Shop.mdb" EditCustomerConnection.Open() EditCustomerAdapter = New OleDb.OleDbDataAdapter("UPDATE Customers SET First Name = '" & txtEditFirstName.Text & _ "Last Name = " & txtEditLastName.Text & _ "Address 1 = " & txtEditAddress1.Text & _ "Address 2 = " & txtEditAddress2.Text & _ "Postcode = " & txtEditPostcode.Text & _ "Phone Number = " & txtEditPhoneNumber.Text & _ "WHERE ID = " & txtCustomerID.Text & "'", EditCustomerConnection) CommandBuilder = New OleDb.OleDbCommandBuilder(EditCustomerAdapter) EditCustomerAdapter.Fill(EditCustomerTable) EditCustomerConnection.Close()
i dont know where im going wrong in that update statement,Can you please help me