UPDATE Syntax Error
Hi,
I keep getting a java update syntax error and can't for the life of me figure out where it is. Help?
criteria ="UPDATE Customer SET CustomerID = '" + txtCustomerID.getText() +"', " +
"CompanyName = '" + txtCompanyName.getText() +"', BusinessAddress = '" + txtBusinessAddress.getText() +
"', City = '" + txtCity.getText() +"', State = '" + txtState.getText() +"', ZIP = '" + txtZIP.getText() +
"', ContactName = '" + txtContactName.getText() +"', CustomerSince = #" + myDate +"#, ContactPhone = '" +
txtContactPhone.getText() +"', FaxNumber = '" + txtFax.getText() +"', OtherPhone = '" + txtAltPhone.getText() +
"', EmailAddress = '" + txtEmail.getText() +"', Note = '" + txtNotes.getText() +"' WHERE CustomerID = '" +
txtCustomerID.getText() +"'";
And the resulting SQL query is:
UPDATE Customer SET CustomerID ='000-0002', CompanyName ='Stink Inc.', BusinessAddress='103 N University St.', City ='West Lafayette', State ='IN', ZIP ='47906', ContactName ='Ryan Hedlund', CustomerSince = #2005-12-25#, ContactPhone ='317-545-8766', FaxNumber ='3178789964', OtherPhone ='3178446555', EmailAddress ='rhedlund@purdue.edu', Note ='Hedlund is a smelly smelly man.' WHERE CustomerID ='000-0002'

