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)
 Dyanamically Creating Database

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-18 : 09:23:21
shamand writes "How we can create a SQL Server Database From Visual Basic

How we can run a script file(.sql) from Visual Basic

Kindly try to help me"

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2002-06-18 : 09:40:03
To run a script file you can use osql or isql.
Look in BOL for the syntax

Shell "osql /U /P /i createDB.sql /o createDB.out"



Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-06-18 : 09:40:12
Which part is giving you trouble? Do you have a script file with a CREATE DATABASE statement? Can you execute database commands from Visual Basic? There are many ways to accomplish each task, and if you already have part of the problem figured out it'll save us some typing...

<O>
Go to Top of Page
   

- Advertisement -