Issue trying to deploy solution with SQL Database

inkedGFX

Well-known member
Joined
Feb 2, 2013
Messages
142
Programming Experience
Beginner
Hello...

I am in the process of creating a solution that will save rss feeds to a Database....I have the project complete but cannot seem to get the database to work when I create a Setup Installer....I have build this setup a few time trying different things, nothing is working......see below screenshot for the error ....

screen01.jpg

here is what I have done so far.

1. included all the sql refrences I use in the project....
2. included all the dll file for the SQL Express Server ( there were 7 files )
3. selected the dll's and in the properties I set the "copy to output" to "copy if newer"
4. added a Refrence to the "System>Data.SqlServerCe" and set "Copy Local" to True.

then in the setup installer I add all the prerequisites such as -

net framework 4.0 ( in case the end user's machine doesnt have it)
Microsoft Sql Server 2008 Express SP 1 (x86)

now I see a Microsoft Sql Server 2008 Express SP 1 (x86 & x64Wow) should I be using this one?

Please , any help would be appreciated.....

Thank You
-InkedGFX
 
Last edited:

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,124
Location
Sydney, Australia
Programming Experience
10+
SQL Server Express and SQL Server CE are two completely different things. I can't imagine that you are actually legitimately using both so you need to first work out which one it is that you're using and then deploy what's required for that on and get rid of anything to do with the other. So, is your database file an MDF or an SDF? The former is for SQL Server Express and the latter is for SQL Server CE.
 

inkedGFX

Well-known member
Joined
Feb 2, 2013
Messages
142
Programming Experience
Beginner
Thank You for your help with this issue......

my database is a MDF so I got rid of all the dll with ce in their name.....do you know what dll's I need to add and what refrences I need to include with this project?

-InkedGFX
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,124
Location
Sydney, Australia
Programming Experience
10+
SQL Server Express is basically a cut-down edition of SQL Server, so working with it is the same. As such, you don't need to add any references because the SqlClient provider is defined wholly within the System.Data.dll assembly, which is referenced by default in most project templates.

Unlike SQL Server CE, SQL Server Express is a full server-based database so you MUST install that server on the client machine if you want to deploy an MDF file with your app. If you're using ClickOnce deployment via the Publish wizard or using a Setup project to create an MSI installer, you can simply check the box for SQL Server Express in the Prerequisites dialogue and it will be automatically installed along with your app if it's not already present, even being downloaded automatically by default. I'm not sure how it works with InstallShield LE but I'd expect it to be similar. If you're using some other deployment tool then you'd have to check the documentation to see if it can handle the database deployment automatically. If you're just using XCOPY then you'll have to have the user install SQL Server Express themselves.
 
Top Bottom