[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

Bundle SqlCe libraries with app

Hello,

I'm building my first VB.net desktop app that uses the SqlServerCE database for my backend and I need to figure out how to bundle the libraries with the app so that end users to not have to download or install SqlServerCE on their machine to make it work.  Currently, I zip the executable and the database file from the debug directory and send it to my test user.  When he opens the app it works fine until he tries to login, which is when the app tries to connect to the database.  He is greeted with the exception:

"Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, etc' the system cannot find the file specified."

Any thoughts on the subject are greatly appreciated,

Mike
0
MClarkCCR
Asked:
MClarkCCR
  • 4
  • 3
2 Solutions
 
CodeCruiserCommented:
My first question is why are you using a SQLServerCE as a backend to a desktop application. There may be reasons. One option is to use the setup project to create a setup which may be able to install the sqlce for you.
0
 
MClarkCCRAuthor Commented:
CodeCruiser,

Thanks for such a quick response!

This app will be a standalone app, an upgrade from a previous Microsoft Access project I had done.  I don't want to use .mdb as people would just be able to open up the file in Access and view and modify records that way.  My reasoning for using SQLServerCE is that the user wouldn't need to have a full blown database server installed and running on their machine.  At least that's how understand that it would have to be in order to use SQL server, if I'm mistaken please let me know.  

I'm at work and will not be able to test your solution until this evening.  Once I do and it works, I'll accept your post as the solution.

Thanks,

Mike
0
 
CodeCruiserCommented:
You could use password protection on Access files. In my understanding, you need the SQLServerCE to be installed as well to be able to use it. Another option is to use SQL Server Express edition which is free.
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
MClarkCCRAuthor Commented:
I could PW protect the MDB I suppose, but to me it seems like it'd be about as effective as PW protecting an Excel spreadsheet.  Would it be THAT hard to break?  I realize I'm more or less just making assumptions and haven't done any real research on the subject, but Microsoft Office files don't seem to have the best track record for security.  At any rate, I've also already done the CE backend so I'll keep it  :).  SQL Server express IS free, but doesn't that have to run as a server as well?  CE just seems all in all like it would be the most lightweight option.  
0
 
MClarkCCRAuthor Commented:
CodeCruiser,

I tried to create a setup project for my solution, but I'm using VB.net 2008 Express and it unfortunately does not appear to have that option.  Is there anything else I might be able to do in order to package the SqlServerCE assemblies with my app?

Mike
0
 
CodeCruiserCommented:
I do not know of any other way because the SQLServerCE assemblies and files may be installed at multiple places including the GAC. You may be able to include the set of SQLServerCE and ask the user to install it first.
0
 
MClarkCCRAuthor Commented:
Ok,

I think I may have an older copy of Windows Installer somewhere I might be able to use once the app is ready for release.  I'll just make sure my test user installs the SqlCe libraries manually.  Thanks for your help!

Mike
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now