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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 executing .sql files

Author  Topic 

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2002-05-03 : 05:05:09


i have some query and script to create table
is there a way to run the script .......

======================================
Ask to your self before u ask someone

jackstow
Posting Yak Master

160 Posts

Posted - 2002-05-03 : 05:46:35
SQL Query Anaylzer - thats the one you want..

Go to Top of Page

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2002-05-03 : 06:28:55

thanks jackstow

i have it i dont want to open the file ..... say i have a vb App
through i want to run the sql file..

how do i run a .sql file in SQL Query Anaylzer with out opening it


======================================
Ask to your self before u ask someone
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-05-03 : 06:58:48
Khalik

YOU HAVE TO ASK THE QUESTION PROPERLY IF YOU WANT A GOOD ANSWER!

You can do it by loading the script into a string variable in VB and then passing that string to the ADO Command or Connection .Execute method.

The VB to do this is beyond the scope of SQL Team

Damian
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2002-05-03 : 11:05:44
Lookup the osql/isql Utility in BOL.

HTH
Go to Top of Page
   

- Advertisement -