Temporary Tables, SQL and Jet 4

Results 1 to 4 of 4

Thread: Temporary Tables, SQL and Jet 4

  1. #1
    Rob Guest

    Default Temporary Tables, SQL and Jet 4

    Can you use temporary tables with a Jet 4 database? i have code that is similar to: (the hash makes it a temporary table)<BR><BR>&#060;%<BR> strSQL = "CREATE TABLE #UniqueWords (Words);"<BR> Set oConn=Server.CreateObject("ADODB.Connection")<BR> oConn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="d:/data/mydb.mdb;"<BR> oConn.Execute strSQL, ,adCmdtext<BR><BR> oConn.Execute "DROP TABLE #UniqueWords;", ,adCmdText<BR>%&#062;<BR><BR>in my asp page but the page returns:<BR><BR>Error Type:<BR>Microsoft JET Database Engine (0x80040E14)<BR>Syntax error in CREATE TABLE statement.<BR>/zzz.asp, line 27<BR><BR>i have searched MSDN, technet etc but have for no reference to this.<BR><BR>if you know, you&#039re a star!!!<BR><BR>rob<BR>

  2. #2
    Eddie Campbell Guest

    Default RE: Temporary Tables, SQL and Jet 4

    This will create a table with 2 fields (1 text and 1 numeric)<BR><BR>set ObjConn = server.createobject("adodb.connection")<BR>ObjConn .Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:/data/mydb.mdb;"<BR>ObjConn.execute "CREATE TABLE UniqueWords(field1 TEXT, field2 number);"<BR><BR>This will delete the table<BR><BR>set ObjConn = server.createobject("adodb.connection")<BR>ObjConn .Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=d:/data/mydb.mdb;"<BR>ObjConn.Execute("Drop Table UniqueWords")

  3. #3
    peterjl@austec.net.au Guest

    Default Is it wise to create temp tables in ASP! I thin

    Do not forget that in an ASP page you are working in a relatively unpredictable client-server environment. If you have many concurrent users and they are all requesting the page at the same time you must lock out all other users while you allow the first user to create the table, until he is finished with it. If the result is to be used across a number of pages you had better hope he completes his transaction in a timely manner.<BR><BR>The only case where it would be safe to use such a device is in a strictly controlled intranet situation, or where the function is available to a very restricted audience. I still think that even in these situations there must be a better alternative.<BR><BR>You can run a select query and dump the result into an array via the RecordSet.GetRows method, which you could process via your asp script.

  4. #4
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Maybe this is the problem

    &#062;CREATE TABLE #UniqueWords (Words);<BR><BR>where is the data type??<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