Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    Holland
    Posts
    16

    Question Unanswered: How to CREATE a TABLE in SQL?

    I am trying to copy a table, but without success. I use MS Access 2000 and ASP. Does anyone know how to do this?

    The code is as follows:

    <HTML><BODY><TABLE>

    <%

    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("../db/db2.mdb")
    sqlString = "SELECT * FROM login SAVE TO tblUNIEK"
    Conn.Execute sqlString
    Conn.Close

    %>
    </TABLE>


    </BODY></HTML>

  2. #2
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    Did you create your new table tblUNIEK?
    If so, you can change your sql-string to:
    insert into tblUNIEK select * from login;
    rws

  3. #3
    Join Date
    Feb 2002
    Posts
    2,232
    Try the following:

    cn.Execute "select * into newtable from existingtable"

Posting Permissions

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