Create New Database With VBScript

Results 1 to 2 of 2

Thread: Create New Database With VBScript

  1. #1
    Join Date
    Dec 1969

    Default Create New Database With VBScript

    Hi I am trying to create a new database with VBScript using the SQL Statement :<BR><BR>CREATE DATABASE NAMEHERE<BR><BR>But I am very new at this and dont know how to execute this action within an Asp page? If anyone could help it would be great.<BR>Thanks<BR>Zach<BR>

  2. #2
    Join Date
    Dec 1969

    Default You cannot do that, but... *can* create a new *table* inside an existing database. Which is generally much the better thing to do, anyway!<BR><BR>See<BR><BR>NOTE: There is one trick you could pull. You could create an empty Access database (using can&#039;t do it from VBS) and then use the FileSystemObject and the CopyFile method thereof to copy the db file to a new directory, then you could create tables in that copy of the db, and you would, for all intents and purposes, be creating a db.<BR><BR>But, truly, proliferating databases is generally a mistake. You are almost better off creating new tables, instead. (Did you know the IBM DB2 allows only one database *per computer*? That you can *only* add new tables to that single database? [This in on the mainframes...not sure how it works on Unix boxes and/or PCs.] The reason: Because they *know* that they can manage the disk space much more efficiently if they have only a single database but multiple tables. Of course, they must then have security set up on a table by table basis, but when using a web server security is not likely to be the same kind of issue.)<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