Hey!
I am having a heck of a time dynamically creating a table (via the create table command) against an Access 2000 database where I want the field to be named "size" (without the quotes). My asp page returns:
Microsoft JET Database Engine (0x80040E14)
Syntax error in field definition.
Here is a shot of the line of code that does the query:
crstate="CREATE TABLE "
crstate2=" (ID counter, "&myoption&" text, addprice currency, addship currency, primary key (ID))"
crstate= crstate&identRS("clinum"
&myoption
crstate= crstate & crstate2
set connect = Server.CreateObject("ADODB.Connection"
connect.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("mydb.mdb"
connect.Execute(crstate)
Basically, this code creates a table with the name that they decide, prefixed with their client number. In this case, the table is going to be named "1size". The problem is in the create table query. The second field will be called "size", but I think that "size" is some sort of keyword or something. It seems to work for any other word!!
I realize that I could just append something to the field name to get around this, but that would also mean plowing through my other pages looking for calls to that field, and correcting them....
Hope someone can help!!
Dave
I am having a heck of a time dynamically creating a table (via the create table command) against an Access 2000 database where I want the field to be named "size" (without the quotes). My asp page returns:
Microsoft JET Database Engine (0x80040E14)
Syntax error in field definition.
Here is a shot of the line of code that does the query:
crstate="CREATE TABLE "
crstate2=" (ID counter, "&myoption&" text, addprice currency, addship currency, primary key (ID))"
crstate= crstate&identRS("clinum"
crstate= crstate & crstate2
set connect = Server.CreateObject("ADODB.Connection"
connect.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("mydb.mdb"
connect.Execute(crstate)
Basically, this code creates a table with the name that they decide, prefixed with their client number. In this case, the table is going to be named "1size". The problem is in the create table query. The second field will be called "size", but I think that "size" is some sort of keyword or something. It seems to work for any other word!!
I realize that I could just append something to the field name to get around this, but that would also mean plowing through my other pages looking for calls to that field, and correcting them....
Hope someone can help!!
Dave