Step by step to deploy VB.net project.

damxuanthai

Well-known member
Joined
Mar 1, 2007
Messages
48
Location
Việt Nam.
Programming Experience
Beginner
I have read all threads in this topic (deployment) but I'm still don't know clearly How to deploy a Vb.net app using SQLdatabase.
AnyBody can show me step by step How to deploy. I want to make a msi file to install my app in other PC Which don't connect to Internet.
Thanks alot.
 
Im a newbie, and I learn Vb.net by myself
Due to me. Steps to deploy:
Step 1: Add a deployment project (choose "Add to solution") in the same app (solution) which We want to deploy.
Step 2: Make and build a deployment (ourApp.msi file). without SQLserver.
Step 3: Embed MSDE to ourApp.msi file, to setup SQL server on target PC. Use Orca.exe (v1.5 beta with UI)
Step 4: Attach database to server Which We installed on step 3
Step 5: Run app and have fun :D.
In five step below I dont know how to do Step 3. I have download Window install SDK, which contains Orca. in this I have orca.exe version v1.10 and I can't found "Merge module" to embed MSDE vào file msi.
Please tell me how to solve and other ways to deploy?.
----------
Link help from MSDN: Embedding MSDE 2000 Setup into the Setup of Custom Applications.
http://msdn2.microsoft.com/en-us/library/aa902673(SQL.80).aspx
 
I'm not sure about this but I believe the destination PC has to have SQL Server already installed as well. If not your application will have to reach the internet or intranet to access YOUR SQL Server. BUT! Don't qoute me on this because I am not positive. Hopefully someone else can jump on here and confirm or correct me. Anyways, I was just reading your other post with the error message "SQL Not Installed" or somthing like that and then I read this one where the app won't be reaching the internet and I think that's the situation. I don't think you can attach SQL Server to an installation but only the database in which it uses maybe.

But you know what, I don't know much about how SQL deploys and crap its just a thought for me. Self taught here also.
 
Thanks to ImDaFrEaK.
I think it is very inconvenient when using SQLserver. I only want to make a small Dictionary, and give to some freinds as a gift, and it is too bad if I ask them to install SQLserver with correct name of server and password to access to this server Which correct with my SQLserver I was used in my PC.
I think there are another way to solve this thread. Please discuss about this and help me.
 
If you choose ClickOnce deployment you can configure Prerequisites to create setup that checks for and installs .Net Framework and SQL Express.
 
Ok, I used your profiles Primary Platform (can be changed) for reference when mentioning ClickOnce. If you use different versions specify when needed which the inquiry regards. I think .Net 2.0 and VS2005 is very good compared to the former, have rarely switched back.
 
JohnH
If you choose ClickOnce deployment you can configure Prerequisites to create setup that checks for and installs .Net Framework and SQL Express.

Correct me if I'm wrong but this will only check to make sure SQL is installed on the target pc before installing? Then with your project you have the option to direct the end user to the vendors website for download, in this case SQL Server Express or if you have the distributable like what is provided with DirectX you can include that with your project. In either case, the end user will still have to install SQL Server whether you re-direct them to the website or attempt to provide it as a seperate install along with your project.

Now maybe I have that all backwards, that is just my understanding on pre-requisites for I use that same method to redirect the user to obtain DirectX with one of my projects. And of course .NET is automatically entered into that list as a pre-requisite.
 
OOPS! My bad....

Step 3: Embed MSDE to ourApp.msi file, to setup SQL server on target PC. Use Orca.exe (v1.5 beta with UI)

I just re-read the top post and saw that the answer John posted was the answer you were looking for. For some reason I thought you were trying to use SQL database files without installing SQL Server from your project only. I apologize.
 
JohnH

Correct me if I'm wrong but this will only check to make sure SQL is installed on the target pc before installing?
Prereq will check if the requirement is present and install it before installing the app. It will get the prereq from where you choose in Visual Studio dialog, for example directly from MS.
 
Yeah I know. I made a mistake and was thinking he wanted something different. I corrected myself immediately after but you must have responded before my correction was posted. Sorry about that, I saw right after that the answer you gave was what he was looking for.
 
To JohnH: Thank you very much.
I have just installed Vs.2005, and try using ClickOnce and found that: Deployment in VS2005 is very easy. It is more easier than in VS.2003. Just a click.
Thank again.
 
By Using ClickOnce, SQL server can install with my app. But We only have a fresh installation of SQL server Express. We must attach the database by hand.
I have using SQL Server Management Studio Express to attach file .mdf to server in my freind's computer (Which Pc I used to test my setup file). But there is an Error (in the attached picture). SomeOne can help me on this thread.
 

Attachments

  • Error.JPG
    Error.JPG
    110.3 KB · Views: 72
Actually I haven't deployed a database app, so I can't tell for sure, but I was under the impression that the database file deployed with the app opened in default server instance without need for additional installation steps. It would be very strange otherwise since ClickOnce is not configurable for custom actions, and VS Express + ClickOnce + SQL Express were basically designed coupled as one working unit. It is the connectionstring that have to dynamically access the application path when deployed, see http://weblogs.asp.net/jackieg/archive/2004/07/23/192255.aspx
 
A new SQL Express database will generate this connectionstring in application settings:
Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\newdatabase.mdf; Integrated Security=True; Connect Timeout=30;User Instance=True
The |DataDirectory| is here a special keyword that points to the applications data folder where the database file is deployed by ClickOnce. The AttachDbFilename instruction will attach the database on first startup, else just connect to this db later. There is some info about it here: http://msdn2.microsoft.com/en-us/library/ms345154.aspx (AttachDbFilename section)

I deployed this test application now on my local computer and it worked this way without any modifications needed.
 
Back
Top