Click to See Complete Forum and Search --> : create table syntax error


aloysius
04-12-2004, 01:36 AM
hi! currently i'm using dreamweaver to create my web pages and asp as the middle ware...i use access as my database..yupp...my codes for a particular page looks like this

dim conn
dim conn_DSPRMS
dim sql

set conn = server.createObject("ADODB.Connection")
conn_DSPRMS = "DBQ=c:\inetpub\wwwroot\DSPRMS.mdb;"
conn_DSPRMS = conn_DSPRMS & "Driver={Microsoft Access Driver (*.mdb)}"
conn.open (conn_DSPRMS)

sql = "CREATE TABLE tblTest ([listname] [varchar] (200) NULL , [listcreator] [varchar] (200) NULL )"
conn.execute (sql)
%>

i wanna create a page to allow the user to create a table automatically in access...but i keep having this error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition.
/DSPRMS/create_table2.asp, line 13

can anyone enlighten me on this?

buntine
04-12-2004, 01:43 AM
I already gave you the code, buddy..

sql = "CREATE TABLE tblTest (listname varchar(200), listcreator varchar(200))"
conn.execute (sql)

Regards,
Andrew Buntine.

aloysius
04-12-2004, 03:54 AM
ya...but i still have errors for some unknown reason..sigh..think i'll never get this worked out..

aloysius
04-12-2004, 04:53 AM
i know..but when i put your code into use..it always gives me the error...(that error that i stated)..yupp..so i really dunno how to do this..

buntine
04-12-2004, 05:06 AM
Then the problem lies somewhere else in your code. Execution errors can be misleading.

aloysius
04-13-2004, 04:35 AM
thanks for your help..you have been most kind..but i dun seem to know the solution..think i'll KIV this first..thank you though