Unable to create table using VBSCRIPT.

T

Thomas L. Ickes

I need to create a table on the fly using vbscript. It's an older version
database so I cannot directly make changes since I cannot convert the table
(it's a customer's). My SQL command is simple enough "CREATE TABLE NewTable
( 'newCOLname' int )". Everytime I try to execute it I receive:
a.. Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in CREATE TABLE statement.
/stripCASE/clearCASES.asp, line 268

I'm going bonkers! I also tried using ADOXDIM objADOXDatabase SET
objADOXDatabase = Server.CreateObject("ADOX.Catalog") objADOXDatabase.Create
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=f:\Inetpub\wwwroot\stripCASE\schedule.test.mdb" if not err.number = 0
then errorROUTINE() end if DIM objFirstTable SET objFirstTable =
Server.CreateObject("ADOX.Table") objFirstTable.Name = tableNAME & "archive"
if not err.number = 0 then errorROUTINE() end if
objFirstTable.Columns.Append "CustID", adInteger if not err.number = 0 then
errorROUTINE() end if objFirstTable.Columns.Append "CustName", adVarWChar,
30 if not err.number = 0 then errorROUTINE() end if
objADOXDatabase.Tables.Append objFirstTable if not err.number = 0 then
errorROUTINE() end if
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top