Showing posts with label sqlce. Show all posts
Showing posts with label sqlce. Show all posts

Thursday, March 22, 2012

Deployment of SQLce - DATASOURCE issue

My connection string is simply

Data Source ="|DataDirectory|\Data\Test.sdf"; Password ="test";

and it runs just fine...

I did a simple publish (simple public, no checking for updates or anything)

When the public completes I run the install app. I get the following odd error during install:

************** Exception Text **************
The path is not valid. Check the directory for the database. [ Path = C:\Documents and Settings\jlibertor\Local Settings\Apps\2.0\Data\DZN9D6Y7.8E9\N0WB27KY.XZB\test..tion_b3b178185207c0b7_0001.0000_ef52a43c912d4680\Data\Data\Test.sdf ]

So... any ideas? thansk so much in advance!

have you tried;

Data Source ="|DataDirectory|\Test.sdf"; Password ="test";

Otherwise you can possibly override by using: AppDomain.Setdata

|||

OK I figured it out. ther were 2 reasons...

And if thsi helps anyone I'll past a few things:

You can set the DataDirectory using this code:

AppDomain.CurrentDomain.SetData("DataDirectory", System.AppDomain.CurrentDomain.BaseDirectory)

Place it in the application startup event.

Tip: you can't use the "My.StartupPath" in the event, and instead have to use "System.AppDomain.CurrentDomain.BaseDirectory"

ALSO

Don't forget that if you are getting this error you may not be publishing your .sdf file! (This my problem too) There are SEVERAL things you need to change in order to publich your file.

Tip: A good way to test if you are really publishign your .sdf file to check your publish package for it.

1-Set the properties of the .sdf file to "Content" and Output to "Copy Always"

2-In your Publish settings, look for yoru .sdf file. and force it to incluce.

Tip: After your user installs this once you don't want to publish it again. You'll want to change the above settings and supress this file (otherise you'll overwrite all of their hard-earned data )

deployment of applications

Hi,

I have developed several PPC apps in VS2003, which i have deployed to other PPCs using sqlce.wce4.armv4.CAB for the database runtime.

Now I developed a new app. version in Visual Studio 2005, using the free SQL server express database that came with it.

I can create a .cab file for the app using a setup project, but it eludes me what to install on the PPC of the customer, database wise.

Is there some kind of installable runtime for sql server express ?

(Or what is it called today ?)

thx in advance,

Paul.

Hi Paul,

SQL Express edition is only available for desktop and server versions of Windows, not for Windows Mobile. You must use SQL CE version 3.1 cab files, ie: sqlce30.ppc.wce4.armv4.CAB and sqlce30.repl.ppc.wce4.armv4.CAB (for Windows Mobile 2003 devices)

Monday, March 19, 2012

deploying sql ce with desktop application

i have an application that uses sqlce.. now i want to install sqlce with my installer instead of seperate installer... could you please guide me how can i do this? i have created installer for my application but how to integrate sqlce with it...You can simply include the SQL CE dlls with your app, see this for a walkthrough of the options: http://msdn2.microsoft.com/en-us/library/bb219481.aspx