Create Access tables in ASP

Results 1 to 2 of 2

Thread: Create Access tables in ASP

  1. #1
    Join Date
    Dec 1969

    Default Create Access tables in ASP

    Hi,<BR><BR>My ASP page needs to create an Access table. I have used the following code - <BR><BR>Dim conn <BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.Op en "DSN=Survey" <BR>Dim strSQL <BR>strSQL = "CREATE TABLE survey3 (Q1 text(20),Q2 text(20));" <BR>conn.Execute strSQL<BR><BR>This code when executed gives the following error - <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in field definition. <BR><BR>The SQL in strSQL, when used in an Access query creates the table without a hitch. But the ASP page throws an error. <BR><BR>A reply shall be greatly appreciated.<BR><BR>Thank you,<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Is the DSN...

    ...made via a JET OLEDB connection?<BR><BR>If not, then you might need to try <BR> char(20) <BR>or better<BR> varchar(20)<BR>in place of text(20).<BR><BR>But if you are using a JET OLEDB driver, that syntax *should* be working.<BR><BR>Oh...I just noticed! NO!!! You are *NOT* using the JET driver. The error *is* coming from "ODBC Microsoft Access Driver"!<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts