How to deploy vb.net project with SQL Server CE as database - vb.net

I created a vb.net project and I used SQL Server Compact Edition as my database. Now I want to create an installer for it, for installing on different PCs.
Does it require to install Visual Studio on the client PC? How should I create installer which will include that database file?
Sorry for my bad English.
Please help.
Thank you in advance.

This msdn link shows how to do it:
https://msdn.microsoft.com/en-us/library/aa983326.aspx
There are 2 parts to it:
Deploy the database file. This can be done by setting the file to copy local always and updating your connection string to point to this.
Deploy the sqlserverce dll's. Follow the instructions in the msdn link which will copy the 7 dll's locally. This means you don't have to install sqlserverce on the individual pcs.

Related

How can I create an installation file in vb. Net

I created my project with ms access database and it worked well in the visual studio environment. When I created an installation file/set up and installed it, the system is no longer saving data into the database. How can i overcome this problem?
First of all, check if database is working and linked properly?
2nd, If your User Interface is developed in .Net?
3rd, Use InstallShield to compress your Application data to install it.

Sqlite in Visual Studio 2008 Smart Device VB.net

im developing a project where i have to read a single database file (.db) from the directory "personal" in a PDA, im using smart device vb.net and i dont know if there's a way to read that single database file, i would post here what i've tried but unfortunately i haven't found anything, if there's a way i would be very happy, thanks!
-Visual Studio 2008
- VIsual Basic SmartDevice
- Target: Windows Mobile 2003 Pocket PC.
In the case that it cant be done, is there a way to read a single database file, i mean, if it can't be done with .db, is there another kind of database file that the program can read just that one, in the directory "\personal\mydatabase.db"
System.data.SQLite included a compact framework version
http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki
You will need to instal SQL CE 3.5 on the device and the sdk on the Computer.
(When you install the sdk, this will create a folder with all the cab files you will need)
You Can Download it Here http://www.microsoft.com/en-us/download/details.aspx?id=12264

SQL DB Deployment

The scenario:
I have written a software application that includes an installer, that is to be used by Mr Layman to install the system on to a single computer.
The system is a simple C# winforms application with an SQL Express database. The target machine would be a standard installation of Windows XP with SQL Express and .NET 3.5 installed.
I am able to create the installer for the winforms app, that would check the version, create all the directories and copy over all the necessary executable's etc. I have also an SQL script that will create the database and populate it with the necessary data. However I do not know how to go about creating a stand alone installer for the database on the target machine.
I have an SQL script that will create the database etc, but how do I make the installer run this script? I've had a google and I don't really know what I'm looking for, can someone point me in the right direction please.
Thank you in advance.
Create a custom action in the installer project that will take your SQL script and run it against the database. Here's an MSDN link that covers the basics.
An installer which runs SQL scripts can be created in 2 ways:
The very hard way:
create an installation with custom dialogs which retrieve the SQL connection information
save that information somehow (in an MSI package you can use installer properties)
write a custom action which uses that information to connect to SQL Server and run your script
The easy way:
use a setup authoring tool which supports SQL scripts
If you want a free solution, I recommend WiX. It has a steep learning curve, but it does what you need.

publishiing of vb.net application with setup procces

how can i keep the sqlserver install automatically when i install my project with attached my own database to sqlserver 2008 express after publish my project. what is the code i can write to in the setup project under vb.net to keep this happened thanks a lot
To get it to install Sql Server Express, just tick the appropriate box in the prerequisites screen as described here.
To attach your db look at this article for various ways of doing it: Detaching and Attaching Databases
I think the recommended way is to use CREATE DATABASE FOR ATTACH

Visual basic .net 2008 Deployment

Is it possible to make a setup and deployment project in VB.net 2008, every site i have looked at on google says to just select it from the project list. It isnt in the project list for me to select.
Are these types of projects not available in the express version?
How can I make an installer, other than using one of the setup and deployment projects? (I know there is a publish button, but that doesn't make a proper installer and installs to the appdata folder which is not what i want it to do)
Any help is appreciated
You would need to use another program, such as innosetup (http://www.jrsoftware.org/isinfo.php), to create a setup.exe. Microsoft has to give you some reason to purchase their software.
Express editions do not have these project types. They support ClickOnce only, per this chart:
http://msdn.microsoft.com/en-us/library/zcbsd3cz(VS.80).aspx
This carries over to the 2008 versions as well.
Edit - Added
See here for using ClickOnce from an Express edition:
http://blogs.msdn.com/vbteam/archive/2008/10/02/looking-for-setup-and-deployment-project-templates.aspx
You could use Inno Setup
It pretty much will do what you need to create an installer package. Oh yeah, and it's free.