PDA

View Full Version : Create a db in SQLSERVER



geppo12
12-28-2002, 02:57 PM
There is a method to check MSSQL looking for a database and if not found create it (my be throught custom action)

Example code would be appreciate.

Thanks
Ing Giuseppe Monteleone

mberterm
01-24-2003, 08:58 AM
There is no native functionality in Express for this type of task. However, Express can launch custom actions for DLLs, EXEs and VBScripts which themselves contain that functionality.

mberterm
01-24-2003, 10:54 AM
You could make a Custom Action that launches OSQL for you to run script.

OSQL is a command line utility that comes with SQL Server to run scripts at the command line. Follow this link for information on how to use it.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_mta_01_5cmk.asp