Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB.NET Application / SQL Server 2005 Express Set up project Deployment

Posted on 2007-12-04
9
6,670 Views
Last Modified: 2013-11-13
I have created a windows forms VB.NET application with a Sql server 2005 Express back end. I would like to get this application packaged and am having some issues...

1) If I use the Publish Wizard in VS2005, I install sql server express fine by adding it as a prereq for my applications, but the application can't find the instance of the sql server to run the app and it errors out

2) if I create a setup project, I don't know how to add sql server express as a prereq....(and have heard you can't have nested msi packages anyway)

Could someone please lead me in the right direction please.
0
Comment
Question by:DAMAdmin
  • 5
  • 4
9 Comments
 
LVL 11

Expert Comment

by:AkisC
ID: 20409838
On the Solution explorer-->right clic your project and select properties
On the window opened cleck Publish
Click Prerequisites and scroll down till you find SQL express  ;-)
0
 
LVL 1

Author Comment

by:DAMAdmin
ID: 20417260
I've done that as denoted by number 1..
What happens when I do that is sql server express installs fine, but when that installation finishes, I get an error when my application tries to start because I'm guessing it's not connecting the database to my application..

Should I see the application itself and files associated somewhere on the acual hardrive of the machine I'm installing to after it's been installed? Does it install everything to the temp directory? Can I determine where the install is placed?
0
 
LVL 1

Author Comment

by:DAMAdmin
ID: 20417279
The error I get is "An attempt to attach an auto-named database for file C:\documents and settings..... failed. A database with the same name exists, or specified file can not be opened, or it is located on the UNC share..

I navigate the path that's in the error, and the mdf file isn't even there..
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 1

Author Comment

by:DAMAdmin
ID: 20417281
if I click the quit button the application pops up, but the records for the application are not there (because the databse isn't loaded)

0
 
LVL 11

Expert Comment

by:AkisC
ID: 20417941
You have to do a little reading on typed and untyped databases with VS2005
Maybe someone else can help you more
0
 
LVL 1

Author Comment

by:DAMAdmin
ID: 20453252
the solution to this was create a setup project and click on properties. There's a prerequisite button there.. Select Sql Express as one of the prerequisites and compile...

Worked like a charm... No issues.. The publish wizard didnt' work, so I went back to number 2 and found the prereq button.. That was the key...
0
 
LVL 11

Expert Comment

by:AkisC
ID: 20455715
Isn't it what I wrote at http://20409838# ?
0
 
LVL 1

Author Comment

by:DAMAdmin
ID: 20476196
no.. you told me to right click on the project of the application and go to properties then publish.. I tried that and got the errors...

What solved the problem was I created a SETUP PROJECT.. Right clicked on that, went to properties, and there was a prerequisites button on THAT... Then I selected SQL Express and everything worked fine..

It was the difference of going to the properties of the setup project instead of the application's project iself and not using the publish menu..
0
 
LVL 11

Accepted Solution

by:
AkisC earned 125 total points
ID: 20476620
Yes, I assumed that you have already created a SETUP PROJECT, because you wrote 2) if I create a setup project,...

Anyway nice that you found your solution :)

Have fun coding...
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question