is this query correct?
-
is this query correct? "INSERT INTO Create(names,city,state,email,username,pword,securityq,answer) VALUES('" + name + "','" + city + "','" + state + "','" + email + "','" + user + "','" + pswd + "','" + question + "','" + ans + "')"; error is Incorrect syntax near the keyword 'Create'
-
is this query correct? "INSERT INTO Create(names,city,state,email,username,pword,securityq,answer) VALUES('" + name + "','" + city + "','" + state + "','" + email + "','" + user + "','" + pswd + "','" + question + "','" + ans + "')"; error is Incorrect syntax near the keyword 'Create'
INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...) is the synatax from w3schools.com[^] is Create your table name? try putting insert into `create` (...) values(...) example
INSERT INTO `Persons` (P_Id, LastName, FirstName)
VALUES (5, 'Tjessem', 'Jakob') -
is this query correct? "INSERT INTO Create(names,city,state,email,username,pword,securityq,answer) VALUES('" + name + "','" + city + "','" + state + "','" + email + "','" + user + "','" + pswd + "','" + question + "','" + ans + "')"; error is Incorrect syntax near the keyword 'Create'
What is name, city, etc ? Where do they come from ? It looks to me like your database security is a nightmare.
Christian Graus Driven to the arms of OSX by Vista.
-
is this query correct? "INSERT INTO Create(names,city,state,email,username,pword,securityq,answer) VALUES('" + name + "','" + city + "','" + state + "','" + email + "','" + user + "','" + pswd + "','" + question + "','" + ans + "')"; error is Incorrect syntax near the keyword 'Create'
"Create" is a reserved word in MSSQL so it cannot be used as the name of a table. Here is a full list of reserved words: http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx[^] You should be able to insert into the table by quoting the table name like so: INSERT INTO "Create" ... Joe Ceresini Network Engineer jceresini@hostmysite.com Hostmysite.com
modified on Monday, February 2, 2009 7:10 PM