473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to create a database from a deployment project?

I would like to create a database for my application when it is
deployed.
This database can be from different types depending on the tool
installed on the customer computer and will be chosen during the
startup wizard.
Where do I write the code in the project?
How do I open a new database programmatically?
How do I open a new database and copy data to it from my files
programmatically?
Is there an example explaining this?
Nov 15 '05 #1
4 2735
Manu,

You should use the ADOX library through COM interop. ADO.NET doesn't
have a mechanism that supports the altering of the schema of a database.
Right now, you have to use ADOX.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Manu" <ec*@bezeqint.net> wrote in message
news:a3*************************@posting.google.co m...
I would like to create a database for my application when it is
deployed.
This database can be from different types depending on the tool
installed on the customer computer and will be chosen during the
startup wizard.
Where do I write the code in the project?
How do I open a new database programmatically?
How do I open a new database and copy data to it from my files
programmatically?
Is there an example explaining this?

Nov 15 '05 #2
If I understand you correctly, you want your app to create a new database
when it is installed. There is no simple way to do it, but depending on
which DBMS you're using (SQL Server, Access, Oracle, etc) there may be tools
to help generate some of the code. You will want to do this when the program
is run for the first time. The code will most likely involve a lot of SQL
statements such as CREATE DATABASE, CREATE TABLE, etc. There may be examples
out there, but you're best bet is to search Google.
"Manu" <ec*@bezeqint.net> wrote in message
news:a3*************************@posting.google.co m...
I would like to create a database for my application when it is
deployed.
This database can be from different types depending on the tool
installed on the customer computer and will be chosen during the
startup wizard.
Where do I write the code in the project?
How do I open a new database programmatically?
How do I open a new database and copy data to it from my files
programmatically?
Is there an example explaining this?

Nov 15 '05 #3
You want to add a class to your project derived from Installer and add the
class as a Custom Action. There are methods you can override to perform
functions on Install, Uninstall, Commit and Rollback. You can even save
state between Install and Uninstall.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemconfigurationinstallinstallerclasstopic .asp

"Manu" <ec*@bezeqint.net> wrote in message
news:a3*************************@posting.google.co m...
I would like to create a database for my application when it is
deployed.
This database can be from different types depending on the tool
installed on the customer computer and will be chosen during the
startup wizard.
Where do I write the code in the project?
How do I open a new database programmatically?
How do I open a new database and copy data to it from my files
programmatically?
Is there an example explaining this?

Nov 15 '05 #4
I think you will find this article very helpful..

http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxwlkwalkthroughusingcustomactiontocreatedatabased uringinstallation.asp

Patrick Baker - Visual Basic/Deployment Quality Assurance Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "General Protection Fault" <ge*******@nospam.yahoo.com>
References: <a3*************************@posting.google.com>
Subject: Re: How to create a database from a deployment project?
Date: Mon, 6 Oct 2003 09:21:02 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <ep**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 66.46.138.11
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:189238
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

You want to add a class to your project derived from Installer and add the
class as a Custom Action. There are methods you can override to perform
functions on Install, Uninstall, Commit and Rollback. You can even save
state between Install and Uninstall.

http://msdn.microsoft.com/library/de...-us/cpref/html /frlrfsystemconfigurationinstallinstallerclasstopi c.asp

"Manu" <ec*@bezeqint.net> wrote in message
news:a3*************************@posting.google.c om...
I would like to create a database for my application when it is
deployed.
This database can be from different types depending on the tool
installed on the customer computer and will be chosen during the
startup wizard.
Where do I write the code in the project?
How do I open a new database programmatically?
How do I open a new database and copy data to it from my files
programmatically?
Is there an example explaining this?



Nov 15 '05 #5

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

Similar topics

2
by: ksskumar | last post by:
Hi Friends, My software's target is to creating a add-in for Outlook. I am struckup of creating deployment of my software. My software flow is as follows, 1. Complete functionality is...
2
by: Ramil Domingo | last post by:
Hi All, I would like to know how to create a setup and deployment project for all my source code solution with varying projects such as VB.NET, C#, ASP.NET, Web Services, etc. so that I could...
6
by: Lloyd Dupont | last post by:
I have a C# application solution (with 2 projects) it's finished and I'm happy with that I have. I use VS.NET 2003 for the development. now I want to create an install package (typically a...
1
by: Richard Hallgren | last post by:
Hi, I have a solution that includes a deployment project. The solution contains a database file (access). Now I'd like to exclude the database and only deploy an updated version of the other...
7
by: Terry Holland | last post by:
I have just created my first asp.net application and I am ready to deploy. The solution consists of the following: A single asp.net assembly to be deployed to web server A number of vb.net...
0
by: kplkumar | last post by:
I want to create a deployment project which would put my web application files into the Program Files-->MyApplication-->App-->Web and then create a virtual directory and point it to this path. ...
1
by: goose28 | last post by:
Instructions for creating a silent install project in Visual Studio.NET 2003 for "All Users". 1) Create a default setup project for your application using Visual Studio (File/New/Setup and...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
7
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.