|
-
Feb 26th, 2003, 10:33 AM
#1
Thread Starter
New Member
Create a database on installation
I have an add on app that is almost ready for distribution. I am trying to use Visual Studio Installer 1.1 to install the app and create a small database on MS SQL Server 2000.
The SQL Server 2000 client already exists on the target and we want to be able to run some sort of script or small app to create the database and tables.
I have been unable to find any sort of information on how to accomplish this. Can some some briefly explain the steps needed and/or point me to some useful information. Any help will be greatly appriciated.
Thanks and Good Luck!
zemp
-
Feb 26th, 2003, 10:47 AM
#2
Fanatic Member
Just generate a script file from SQL server then run it against the new server...
Leather Face is comin...
MCSD
-
Feb 26th, 2003, 10:50 AM
#3
Frenzied Member
You can do it all in one script.
First create the database.
Then create your desired tables.
Then put the relations between them tables.
All this can be done in a scriptfile, which you can run from VB
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Feb 26th, 2003, 01:40 PM
#4
Thread Starter
New Member
Sounds simple, however from where should I run the script? Does VSI have a mechanism for this or do I create a small VB app that VSI will run?
I apologize, but I have not been able to find any goos documentation on VSI that even hints at this sort of thing.
Thanks and Good Luck!
zemp
-
Feb 26th, 2003, 02:20 PM
#5
Frenzied Member
From SQL Server Enterprise Manager select table (or any other object) and right click on it. Select All Tasks > Generate SQL Scripts from dropdown menu. Select Script All Objects on the General tab and click OK. This may take awhile so you better do this overnight. File will be created afterwords. Include that file in the distribution and when program initially runs load entire file into a string variable and excute it via ADODB.Connection.Execute
-
Feb 26th, 2003, 02:22 PM
#6
Frenzied Member
Or you may simply send that file to the other party for manual execution.
-
Feb 27th, 2003, 07:59 AM
#7
Thread Starter
New Member
Thank you McGenius, Swatty and Leather, you have given me a plan of attack.
Thanks again for your time.
Thanks and Good Luck!
zemp
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
|