|
-
Jun 10th, 2009, 06:10 PM
#1
Thread Starter
Member
SQL CE works on Emulator but not on Device...
Hello All,
Im working on a SQL CE database driven app that so far works perfectly in the VB 2008 Emulator (Win Mobile Pro 6). However when I cab the project and run it on my HTC Diamond (Win Mobile Pro 6) I get the following error when I go to insert / display a value (works fine up to this point):
"Cant find Pinvoke DLL 'sqlceme35.dll'"
and I have to quit the application.
I have read around a little and the "fix" appears to be to install 3 cab files:
Path: C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i
Cabs:
1. sqlce.ppc.wce5.armv4i.CAB
2. sqlce.repl.ppc.wce5.armv4i.CAB
3. sqlce.dev.ENU.ppc.wce5.armv4i.CAB
Surely this cant be the answer? My whole goal is to come up with a self-contained cab file that I can send to my friends and then my friends can run it on their WM6 device without having to go downloading extra cab files (that they have no idea of).
Am I missing something ?
Using Visual Basic 2008
Thanks for all your past help guys - I really appreciate it.
-
Jun 11th, 2009, 02:21 AM
#2
Frenzied Member
Re: SQL CE works on Emulator but not on Device...
Hi,
yes - you do have to install several cab files - sorry. You can create a setup project, and include the required cab files in it. You MAY get away with just the first cab file, as sqlce.repl is for replication, and sqlce.dev is for developers, and will install Sql Query on the device
-
Jun 11th, 2009, 02:54 AM
#3
Re: SQL CE works on Emulator but not on Device...
Hey,
To add to what Pete has set, you need to create a setup project, and the easiest way that I have found to install the required CAB files is to have a Custom Install step that takes care of it for you.
You can find a good article on how to do this here:
http://www.devx.com/wireless/Article/31198/1954
And you can find more information about installing SQL Server on the mobile device here:
http://www.christec.co.nz/blog/archives/253
Hope that helps!!
Gary
-
Jun 11th, 2009, 05:15 PM
#4
Thread Starter
Member
Re: SQL CE works on Emulator but not on Device...
Thank you both very much for your feedback - I will look into your suggestions.
Please excuse this following mild rant : 
I must say the more I use Visual Studio the more disappointed I am. The software was extremely expensive and in my opinion has major downfalls. The MAJOR issue I have is if I want to create an application for retail sale I really cannot rely on the Emulators. My present app works fine in the emulator but as previously stated running in the 'real - world' on a device is a totally different story. To enable my SIMPLE app to run on a WM 6.1 device not only do I need extra cabs to enable SQL but the database is not automatically parcelled over to the device. How can a developer possibly "trust" that his app will run on all the different flavors of mobile devices out there? Its mind-blowing to me...
Unbelieveable...
Rant over.
Thanks guys...
Last edited by magohn; Jun 12th, 2009 at 11:52 AM.
-
Jun 12th, 2009, 01:52 AM
#5
Frenzied Member
Re: SQL CE works on Emulator but not on Device...
Hi,
when you test from VS to any device, VS copies over any files needed. This is the same for Full Framework as well as Compact Framework. You wouldn't expect to write a database app on full framework, and just ship the exe and expect it to work - you would have to install the correct cabs.
Add a 'setup' project, or use a third party - that's what you would do for the full framework. .Net CF is just the same.
As far as emulators are concerned, they are good, but they are not real life. We ALWAYS test on real device, for performance and compatibility reasons.
Whilst VS is far from perfect, I think it does a good job. We have been writing and distributing apps since VS first appeared with very few compatibility problems
-
Jun 12th, 2009, 11:50 AM
#6
Thread Starter
Member
Re: SQL CE works on Emulator but not on Device...
 Originally Posted by petevick
Hi,
when you test from VS to any device, VS copies over any files needed. This is the same for Full Framework as well as Compact Framework. You wouldn't expect to write a database app on full framework, and just ship the exe and expect it to work - you would have to install the correct cabs.
Add a 'setup' project, or use a third party - that's what you would do for the full framework. .Net CF is just the same.
As far as emulators are concerned, they are good, but they are not real life. We ALWAYS test on real device, for performance and compatibility reasons.
Whilst VS is far from perfect, I think it does a good job. We have been writing and distributing apps since VS first appeared with very few compatibility problems
Thanks for your advice pete. Im probably more frustrated with the learning curve than the software - but I am still having fun. Any chance of a link to a site that explains how to build a 'newbie' project cab that includes ALL needed files for the best shot at success on numerous devices? I have added a cab project to my application project and all I have been doing is building that single cab and running it on a 6.1 device. Perhaps there is a more 'correct' way of building a cab that automatically brings in other needed cabs and databases for device deployment?
Thanks again for your patience - as I say, though VB2008 is new to me there is an underlying theme of 'fun' to it...
-
Jun 12th, 2009, 01:04 PM
#7
Frenzied Member
Re: SQL CE works on Emulator but not on Device...
Hi,
if you search these forums for 'deploy' or 'deployment' there are pointers to various 'how to do' articles.
If you add a 'setup' project to your project, and search for dependencies, it will pick up the cab files you need to deploy with your application.
-
Jun 12th, 2009, 01:13 PM
#8
Thread Starter
Member
Re: SQL CE works on Emulator but not on Device...
Thank you sir!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|