Showing posts with label pocket. Show all posts
Showing posts with label pocket. Show all posts

Thursday, March 22, 2012

Can't find PInvoke sqlceme30.dll

I am using an O2 XDA II mini running Windows Mobile 2003 SE. Tried creating a Windows Mobile 5.0 Pocket PC project but during deployment, I get this error.

Can't find PInvoke sqlceme30.dll

I have searched thru the forums and found something similar. I tried all their recommendations but no luck. Is there anything I am doing wrong? I copied the DLL files in the device's \Windows directory (sqlceme30.dll, sql*.dll...around 5 DLLs)

I would appreciate any assistance

Please install SQL Mobile CAB, do not copy these DLLs to the device manually. Also it's not clear to me why exactly you would use Windows Mobile 5.0 project for Windows Mobile 2003 device instead of using Windows Mobile 2003 project?

This error is a runtime error, not deployment error, so it appears your application was deployed OK but can not load this DLL probably because you don't have SQL Mobile CAB installed. Normally VS 2005 would install it, but since you're using wrong project type it might fail to do so.

|||

Hi Ilya,

I was just testing it out. Not really for production. I just want to make sure I am doing things right. How do you install the CAB files in the device?

|||

1. Copy CAB file to the device.

2. Click on a CAB from device file explorer.

|||I was able to install SQL Server on my device. I just did the good old restart - - - a soft reset.|||

Hello,

i had the same problem, and i think the manual installation of the CAB file will work, but isn't there a way to deploy the needed cab with the pda application (to include everything in the deployable package of the application)?

Regards

Martin

|||

Sure. It's up to you to create that package. Usually it's an MSI for a desktop which installs NETCF, SQL Mobile and your application CABs via Active Sync to the connected device.

Note: CAB in a CAB is not possible since only one instance of WCELOAD is allowed and it's already running installing first CAB.

|||In my case, the file sqlceme30.dll doesn't appear in \windows directory.

I install only the cabs "sqlce30.ppc.wce5.armv4i.CAB" and

"NETCFv2.wm.armv4i.cab", first de sql and then the framework, as VS do

when deploy.

The solution is install first the framework and after the sql. In this order "sqlceme30.dll" appear in \windows.

I have installed Compact Framework SP1 with the latest patch.|||

Yes, you have to install NETCF first. If NETCF it not detected by SQL Mobile CAB, it won't install managed provider and related files and your managed application won’t work.

Can't find PInvoke sqlceme30.dll

I am using an O2 XDA II mini running Windows Mobile 2003 SE. Tried creating a Windows Mobile 5.0 Pocket PC project but during deployment, I get this error.

Can't find PInvoke sqlceme30.dll

I have searched thru the forums and found something similar. I tried all their recommendations but no luck. Is there anything I am doing wrong? I copied the DLL files in the device's \Windows directory (sqlceme30.dll, sql*.dll...around 5 DLLs)

I would appreciate any assistance

Please install SQL Mobile CAB, do not copy these DLLs to the device manually. Also it's not clear to me why exactly you would use Windows Mobile 5.0 project for Windows Mobile 2003 device instead of using Windows Mobile 2003 project?

This error is a runtime error, not deployment error, so it appears your application was deployed OK but can not load this DLL probably because you don't have SQL Mobile CAB installed. Normally VS 2005 would install it, but since you're using wrong project type it might fail to do so.

|||

Hi Ilya,

I was just testing it out. Not really for production. I just want to make sure I am doing things right. How do you install the CAB files in the device?

|||

1. Copy CAB file to the device.

2. Click on a CAB from device file explorer.

|||I was able to install SQL Server on my device. I just did the good old restart - - - a soft reset.|||

Hello,

i had the same problem, and i think the manual installation of the CAB file will work, but isn't there a way to deploy the needed cab with the pda application (to include everything in the deployable package of the application)?

Regards

Martin

|||

Sure. It's up to you to create that package. Usually it's an MSI for a desktop which installs NETCF, SQL Mobile and your application CABs via Active Sync to the connected device.

Note: CAB in a CAB is not possible since only one instance of WCELOAD is allowed and it's already running installing first CAB.

|||In my case, the file sqlceme30.dll doesn't appear in \windows directory.

I install only the cabs "sqlce30.ppc.wce5.armv4i.CAB" and

"NETCFv2.wm.armv4i.cab", first de sql and then the framework, as VS do

when deploy.

The solution is install first the framework and after the sql. In this order "sqlceme30.dll" appear in \windows.

I have installed Compact Framework SP1 with the latest patch.|||

Yes, you have to install NETCF first. If NETCF it not detected by SQL Mobile CAB, it won't install managed provider and related files and your managed application won’t work.

Tuesday, March 20, 2012

Can't drop SQL Mobile subscription at Publisher

I have a program running on Pocket PCs that synchronizes with a desktop SQL database using SQL Mobile. My problem is that I can't delete old subscriptions from the publication; now the publication has 25 subscriptions and won't accept any more (limit of SQL Workgroup edition). I can delete non-SQL Mobile subcriptions just fine.

Running sp_replmonitorhelpsubscription provides this information:

subscriber: LVCONTACTSMERGE - 5FA305234F0C
subscriber_db: Program Files\PocketLVContacts\LVContacts.sdf
publisher_db: LVContacts
publication: LVContactsMerge

So I set up this bit of code:

USE LVContacts
EXEC sp_dropmergesubscription
@.publication = 'LVContactsMerge',
@.subscriber = 'LVCONTACTSMERGE - 5FA305234F0C',
@.subscriber_db = 'Program Files\PocketLVContacts\LVContacts.sdf',
@.subscription_type='all';
GO

No errors are reported, but the subscription doesn't get deleted.

I've tried shutting down SQL Server Agent (mentioned in another thread); makes no difference.

Any ideas?

--Evan

If you query sysmergesubscriptions, do you get the same values returned as|||

If you query sysmergesubscriptions, do you get the same values returned as sp_replmonitorhelpsubscription? I'm just wondering if the subscriber_db name returned is correct or not.

|||

Yes, both sysmergesubscriptions and sp_replmonitorhelpsubscription give the same subscriber_db name. Note that the name returned, i.e. 'Program Files\PocketLVContacts\LVContactsData.sdf', is the path on the mobile device.

I wonder if it is safe to manually delete a row from sysmergesubscriptions. It seems to work, but no Distributor clean-up is done.

|||

I've found where I was going wrong. The code I cited in my original post DOES work, but to see the changes you must use sysmergesubscriptions, NOT sp_replmonitorhelpsubscription. The latter apparently reflects the distribution database, which is not cleaned up when you use sp_dropmergesubscription.

When you use SQL Server Management Studio to delete a subscription on a mobile device running SQL Mobile, the subscription on the Publisher is NOT also deleted; you must do it manually (or wait until the subscription expires). But it is difficult to determine which subscription on the Publisher corresponds to the one you want to delete on the mobile Subscriber. What I did was first query the mobile Subscriber system table __sysMergeSubscriptions, note the SubscriptionID field, then query the sysmergesubscriptions on the Publisher database, and find the row with a SubID that matches. Then you can run sp_dropmergesubscription using the subscriber_server field as @.subscriber and the db_name field as @.subscriber_db.