Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
09-23-2007, 09:19 PM #1
ASP/SQL: Creating a table in database
I'd like to create a table in an existing database but it doesn't seem to work.
I get this error when trying to execute the SQL statement:
Microsoft JET Database Engine (0x80040E14) Syntax error in CREATE TABLE statement. /system/installation.asp, line 188
CREATE TABLE Insert table name (id INT NOT NULL AUTO_INCREMENT,test1 VARCHAR,test2, test3 VARCHAR, PRIMARY KEY id);
Thanks for the help!
09-24-2007, 04:07 AM #2
- Join Date
- Dec 2002
- Arlington, Texas USA
- Thanked 8 Times in 8 Posts
Your create table code is wrong. There is no insert table. The code is
Code:CREATE TABLE TableName ( id int IDENTITY NOT NULL PRIMARY KEY CLUSTERED, text1 varchar(50), text2 text, text3 varchar(75) )
Users who have thanked miranda for this post:
09-24-2007, 06:22 PM #3
I knew there wasn't an SQL statement as this but I got this value of a form value and that's why it caused the error.
I just didn't notice it.