franck200
16th February 2009 19:36 UTC
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
jpderuiter
16th February 2009 20:25 UTC
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
jpderuiter
16th February 2009 20:28 UTC
Check
http://msdn.microsoft.com/en-us/library/ms176061.aspx
for some syntax and some examples.