473,651 Members | 3,036 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSI for create database and execute scripts

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.
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft

Sep 15 '08 #1
1 3812
"Alhambra Eidos Kiquenet" <Al************ *******@discuss ions.microsoft. com>
wrote in message news:C1******** *************** ***********@mic rosoft.com...
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
Sep 15 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8682
by: Robin Tucker | last post by:
I have some code that dynamically creates a database (name is @FullName) and then creates a table within that database. Is it possible to wrap these things into a transaction such that if any one of the following fails, the database "creation" is rolledback. Otherwise, I would try deleting on error detection, but it could get messy. IF @Error = 0 BEGIN SET @ExecString = 'CREATE DATABASE ' + @FullName EXEC sp_executesql @ExecString
5
3265
by: Frank van Vugt | last post by:
Hi, I noticed that when using the single commandline: drop database <name>; create database <name>; this sometimes fails due to a pg_autovacuum process running on the background. When this happens, the error returned is:
3
1338
by: gruber | last post by:
Hi, I was wondering if the CREATE DATABASE command uses scripts to create the catalog so that I can customize my database creation on DB2? Thanks Chris
1
2709
by: Harlin | last post by:
Hi, I am trying to set up the database for LMS on a Linux box. This box is running SLES 9. I am trying to run the following scripts as user: db2inst1 : ../cr_db2db_audit.sh and I receive the following error messages(snipped for brevity because they are repeating errors):
4
2801
by: Nanda | last post by:
hi, how to create database in mssql server using c#. We can create msacess database using adox, similiarly how to create sql server database using c#. Regards, Nanda.
1
14639
by: Eric Wood | last post by:
We have an application that is accessed using shared drives, client executes program from server. We have already coded the program to create and save the a bat file either locally on the users machine or on the server. Our problem is that when we execute the bat file from the vb code it does not work properly. The bat file is used to connect to a commnad line service running on the server and update a file in another system. We can...
0
1234
by: aPRSComp | last post by:
Which account privileges are required to execute CREATE DATABASE ? Are the minimum required privileges or does MySQL user must have ALL privileges to execute CREATE DATABASE ? Peter
1
2749
by: jatinder.saundh | last post by:
Hi, How do I give create database privielege to a specific user/group at a particular db2 instance ? I read about various authorities like SYSCTRL etc. but I am interested in giving only Create database privilege. I also came across GRANT <system privilege statement and it seems I can execute following statement to achieve what I want, GRANT CREATEDBA to <authorization-name>
1
8956
by: Sue | last post by:
I just installed the free DB2 Express. I am going through the wizard and I am unable to create a database. I keep getting the error "create database path does not exist". The log file says "An attempt is made to create a database on a path without first enabling this feature using db2_create_db_on_path registry variable. Please enable this first and try again. When I tried to set this to yes, I get another error message "no database...
31
2729
by: happyse27 | last post by:
Hi All, How create OOP perl scripts and how to let users select different ouput html template to display the photo that they upload? Including the urls to refer to. Kindly advise... Cheers..
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7299
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.