Archive: Create new database


Create new database
I want to create a new database.

The database was a hardcoded name ex: TestDB

Before run SQL file I want to check if database TestDB exist.
If not exist I want to show window with 2 directoryRequest
to chose directory for LDF file and mdf file.

It's possible to make this with NSIS ?

Thanks


As you want to specify mdf and ldf files, I assume you want to create a MS SQL database.

You can use this plugin for that:
http://nsis.sourceforge.net/MSSQL_OLEDB_plug-in

Just figure out what the query is for creating a database, and execute it.

Regards,
jpderuiter


Check
http://msdn.microsoft.com/en-us/library/ms176061.aspx
for some syntax and some examples.