Skip to content
⌘ NSIS Forum Archive

Create new database

3 posts

franck200#

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#
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:


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

Regards,
jpderuiter
jpderuiter#
Check
Create database syntax for SQL Server and all SQL Database Engine platforms.

for some syntax and some examples.