|
-
Jun 20th, 2002, 07:34 AM
#1
Thread Starter
Lively Member
Creating Database and Tables
anyone here knows how i can create database and table through coding ?? For your information, I am using sql server 7.0 with ASP. After creating the database and tables, how can i identified that the database and tables is create so that it won't create the second time ??? Do anyone here have samples code that i can reffer to ???
-
Jun 20th, 2002, 08:33 AM
#2
Fanatic Member
Checking if its there is never a problem. Just try to connect to the thing. Good luck createing the database though ( this does not mean that you can't, just that I don't know how ).
I presume you are want to know what to connect to to create the database and not the actual database creation sql statement.
-
Jun 20th, 2002, 09:05 AM
#3
Lively Member
There are several ways to approach creating a database programmatically. The best way, in my opinion would be to write your scripts and store them in seperate files and then execute the scripts through VB.
What DBMS are you planning to use? I may be able to get my hands on some sample scripts for you to alter and use.
BTW, if you can create the database first it would make life much easier on you. Creating a table using VB is a breeze but as I said there is a lot to creating a database using SQL scripts.
Edited cause I left out the B in DBMS
Last edited by KMcKenzie; Jun 20th, 2002 at 12:12 PM.
-
Jun 20th, 2002, 11:21 AM
#4
Thread Starter
Lively Member
I would like to create a pay roll system where all the employees are able to key in their claims. The database name will be represented by the month and the table name will be represented by the username.
I choose to create the database automatically because, if the user wants to key in their claims, they need not need to wait for the database and table to be created by the operator. Instead those who will be the first one to keyin their claims will create the database and its own table. As for every user, their own table will be created when enter the claims for the first time for the particular month. It will be nice if it is possible to execute a script to create a database and tables for every user at 1st of everymonth right after the 12.00 midnite.
-
Jun 20th, 2002, 08:19 PM
#5
Re: Creating Database and Tables
Originally posted by winsonlee
anyone here knows how i can create database and table through coding ?? For your information, I am using sql server 7.0 with ASP. After creating the database and tables, how can i identified that the database and tables is create so that it won't create the second time ??? Do anyone here have samples code that i can reffer to ???
Check out the links i posted on this thread.
http://209.120.143.185/showthread.ph...hreadid=127686
Hope this helps.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|