Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Installation and running scripts

Author  Topic 

bkmurti
Starting Member

13 Posts

Posted - 2002-11-06 : 20:33:47
Hello
i use SQL Server 7.0 desktop server as backend to my project in VB.
i generated script for my tables. and i also created setup package for my project.

what i am doing now is going to sqlserver enterprise manager creating a new database and then going to query Analyzer and running the scripts.

1. Is there any way i can run scripts of create database as well create table scripts during installation. if so how

2. I found that when u generate script u wont get the rows(record) in the tables. Suppose if a situation arises where u need all the rows
how will u manage, should we write individual Insert statements for each row or is there any other way

Thanking u
Gopal


Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-11-06 : 21:38:05
Hi

quote:

1. Is there any way i can run scripts of create database as well create table scripts during installation. if so how



Yes, there is a checkbox in the Enterprise Manager script dialog to allow this.

quote:

2. I found that when u generate script u wont get the rows(record) in the tables. Suppose if a situation arises where u need all the rows



You have a few options here. One is using DTS to transfer data. Another is using BCP to output and re-import data files.
Or, if you want to stay with SQL Scripts, go have a look at www.lockwoodtech.com they have a tool which will generate an insert statement for every row in your table. Or, if your ADO and VB is good, you could write your own tool to do this.

Hope that helps

Damian
Go to Top of Page

p2bl
Yak Posting Veteran

54 Posts

Posted - 2002-11-07 : 23:59:43
u can use isql.exe a dos-command which is shipped with isqlw

========================
look!
Go to Top of Page
   

- Advertisement -