Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP - Creating a table in existing db

    Hi all...

    I have a question... i have been searching answer for this for quite a l0ng time...

    I'm using asp and microsoft access..

    I have a database name, "db1.mdb"

    I want to create a new table inside this database after submittin a name in my form..

    But how do i write my sql statement to execute this?

    Thanx

  • #2
    Regular Coder Baleric's Avatar
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    332
    Thanks
    0
    Thanked 0 Times in 0 Posts
    why do u want to do this?

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so that when a user enter a new class, it will automatic create a table in db with that name.. and i will need that table to insert some data

  • #4
    Regular Coder Baleric's Avatar
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    332
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i mean, why do u want to do this, what will th end result be, how are u going to use it in ur asp pages?

  • #5
    New Coder
    Join Date
    Jan 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in the end i just want to create a table with that name only..

    aniway, i solved it.. thanx aniway!

  • #6
    New Coder
    Join Date
    Jan 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya, wanna ask u something.. can we change the name of the table using sal statement? i know we can change the name of column..

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    I think you have to drop the table and re-create it with the new name.

    I seriously think your db-design is wrong. A user entering a new class, is data, not structure. So if this event happens, it should be entered as data. Not by creating a new table.
    I am the luckiest man in the world

  • #8
    New Coder
    Join Date
    Jan 2005
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya, but because my application works in this way, as i want to create a new table automatically..

    thanx aniway


  •  

    Posting Permissions

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