MSI for create database and execute scripts

  • Thread starter Alhambra Eidos Kiquenet
  • Start date
A

Alhambra Eidos Kiquenet

Hi mister,

I have an Winforms app (Client) and Web app + WCF Services + Windows
Services (Server). In server, I have installed SQL SERVER 2000.

Now, I want create a installer (MSI.exe or another Winforms app) to create a
database, perhaps user, tables, stored procedures, .. Only the user
introduces name of database, server, and if has Windows authentication; if
not Windows authentication, I need user and password.

I have several scripts SQL, that I need execute too. If I use isql command I
have problmes with codification because my scripts sql have Spanish
characters. I tested with using ANSI and UTF-8 encoding for scripts .sql
files, but didn't work.

Finally, how I can create this installer ? is it better MSI ?? or can I
create an WinForms app ??

Any sample will be very very grateful.

Thanks in advance.
 
A

Alberto Poblacion

Alhambra Eidos Kiquenet said:
I have an Winforms app (Client) and Web app + WCF Services + Windows
Services (Server). In server, I have installed SQL SERVER 2000.

Now, I want create a installer (MSI.exe or another Winforms app) to create
a
database, perhaps user, tables, stored procedures, .. Only the user
introduces name of database, server, and if has Windows authentication; if
not Windows authentication, I need user and password.

I have several scripts SQL, that I need execute too. If I use isql command
I
have problmes with codification because my scripts sql have Spanish
characters. I tested with using ANSI and UTF-8 encoding for scripts .sql
files, but didn't work.

Finally, how I can create this installer ? is it better MSI ?? or can I
create an WinForms app ??

You can use an installer project in Visual Studio. You add a Custom
Action, and then program your custom action to send the scripts into the
database server. There is an example in MSDN here:

http://msdn.microsoft.com/en-us/library/49b92ztk.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top