Wednesday, March 28, 2012

Replication Error 28559

We have a PDA application (Net CF 2.0) which uses sql mobile and synchronises to a SQL Server 2000 database (merge replication).

We were using SQL CE 2.0 on the PDA earlier and moved to using SQL mobile recently. Since this move we are getting error 28559 (SQL Server Mobile encountered problems when opening the database - says in the documentation). The error does not happen regularly. When it occurs the device needs a soft reset to recover from the error / close the application and start again. Problem happens more frequently on XDA Exec (http://shop.o2.co.uk/shop/handset/O2/XDAExec:3G) running WM5 compared to devices running Windows Mobile 2003 2nd Edition for Pocket PC phone edition.

I had a chat with one of the Microsoft online support person and what he said was to close the database before synchronising and also to check if the database on the PDA can be open normally using code when the error occurs. We have tested both scenarios and the error still comes. We do not use emulator in our developments. Any advice/help on this issue would be appreciated.

Moving to SQL Server Mobile forum since it sounds like this isn't really a replication problem. If it is, please assign it back to replication forum.|||

I also see this error sporadically on WM5 devices and also have to reset and reinstall SQL Mobile. Some people have gotten relief from opening a connection to SQL Mobile early in the app (in the Load event of the startup form for example), but that's not always an option if, for example, you are using AddOption.CreateDatabase and merge replicating when your app starts.

I will talk this over with the SQL Mobile team. I get the error on an IMate JasJar, but the only pattern I can see with it is if an initial replication fails, this error occurs the next time the app runs.

Darren

|||

When we were getting the 28559 error, if you changed the internet connection (e.g. if the wireless is off and the device is getting on to the internet using the USB cable, remove the cable and switch on wireless to use GPRS) it managed to do the sync without giving errors most of the time.

We also noticed that an instance of a SqlCeReplication has to be created at the beginning of the application otherwise its likely to get "A SQL Mobile DLL could not be loaded. reinstall SQL Mobile. [DLL Name = ..." error when the BeginSynchronize method was called.

-Samitha

|||

Any updates on this error from SQL mobile team?

-Samitha

|||

Hi Samitha,

I have passed on this question to some of my team folks and waiting for an answer.

Please bear with us.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Everywhere, Microsoft Corporation

|||Hi Laxmi
what's the status about the solution to this 28599 SSCE_M_OPENDATABASE error?
I receive the error when I'm trying to synchronize my mobile application with merge replication.
I tried to do it like in the http://msdn2.microsoft.com/de-de/library/ms171908.aspx tutorial but I still receive this error.
When I'm changing AddOption.ExistingDatabase to AddOption.CreateDatabase the 28558 SSCE_M_CREATEDATABASE error occurs instead.
I tried to deploy it (from Visual Studio) with the emulator and as well with the device, still the same result.
Well the client agent seems to have a problem to access the database.

What I don't understand:
When I am synchronising manually from the mobile database to the publication database with SQL Server Management Studio it is working perfectly. What is the mobile application trying to do with the gathered data (that's working perfectly as well) by the repl.Synchronize() Command? Does it try to synchronize the data back to the mobileDatabase on that machine, from which i deployed it (according to the SubscriberConnectionString which is C:\foldername\database.sdf) or does it try to contact the Merge Replication Agent for synchronizing directly to the publisher database?

Florian Weber, University of Rapperswil, Switzerland
|||Hi there
hooray I managed to make it work. The problem was, that the path suggested by the Subscription Wizard isn't the one which should be on the mobile device.
Usually the application will have the following SubscriberConnectionString: "\Programs\applicationName\database.sdf"
If you are unsure of the path, look the installation path up in the dataexplorer of dthe mobile device

Florian|||

Hello Laxmi,

I was just wondering if there was any progress made with regards to this isuue.

Thanks,
Samitha

|||

Hi Samitha,

There were many variants in which you can not open database in REPL/RDA scenarios. We addressed some in VS 2005 SP1 which is going to come out soon. I hope your varinat is also addressed in this.

Thanks,

Laxmi Narsimha Rao ORUGANTI

|||

Has anyone found solution to this problem ? I am having the same problem ... I have migrated an application from Pocket PC 2003 to Windows Mobile 5.0 ..I have changed the project and forms' Target platform to Windows Mobile 5.0 ... The application uses Merge Replication... It works fine on Pocket PC with 2003 but when I run it on Windows Mobile 5.0 device, it gives me this error 28559 "SQL Server Mobile encountered problems when opening the database."

If i do the replication in the constructor or load event of the first form/screen... then it works fine..but if call my MergeReplication function after a couple of screens or some processing .. it gives me the same error...

Is there a solution to this problem ?

Regards

|||

Hello Laxmi,

Do you know when we can expect this update? We are seeing this issue more and more since all our new customers are moving to use the Windows mobile 5 devices.

Thanks,
Samitha

|||

This causes me some concern. The company I work for are Gold Partners, and we have used MS technology throughout our application development.

We now have the interests of the likes of the Department of the Environment, Network Rail, to name but a few. They are very keen to see the application in its fully working state. One of the key selling points is that the system uses standard MS technologies, which ought to reassure them of longevity and stability.

I am accountable as the software engineer to my Directors, and I am in a position where I have had to re-compile the codebase to run on Mobile 5 platforms because they are the only platforms now being supplied.

How can I say to my Directors "sorry, but although we have developed this application for 20 months now, we will have to wait for Microsoft to sort out the bugs in their software, so you will have to tell the DoE and the other companies to come back later"?

I don't think they will say "never mind, it's only been a £400,000 investment. We can wait."

Please can you help me to sort out this problem urgently - I do not seem to be alone here, and not being able to replicate in a consistent and stable way is not an option for our development, and I am sure it is not an option for others.

|||

Nabeel Farid makes his point very eloquently.I want to add my concern.

I am the MD of the company of which samithad is the chief software architect. Finding a solution to this problem has become a joke, the thread was started on the 5th of April, nearly 6 months ago! This forum is the main one for resolving technical problems and yet the effort spent on providing support from the Microsoft side has been minimal.Like Nabeel we are a Microsoft Partner heavily committed to using Microsoft technologies and have spent several £100k developing a product based on the synchronisation capability of SQL Mobile and it’s predecessor SQL CE.

The problem arrived with the move to SQL Mobile and occurs more with Windows Mobile 5 which is now becoming the norm. I appreciate that as an intermittent fault it is harder to track down, however sound replication is the cornerstone of a reliable synchronisation based product and SQL Mobile is failing in this regard.

No one at Microsoft appears to be putting any effort into solving the problem, the complete lack of any sense of urgency is particularly irksome. We are operating in the commercial world here and 6 months with zero progress is dismal

Jonn Fredericks

|||

Hi I was having the same problem. If i pushed the data back early on in the app everything worked fine. If I pushed it at the end (where I wanted to) I got the 28559 error

You need to scour your code for any and all tableadapters, tablereaders etc. anything at all that accesess the sqlmobile db. Make sure that they are all disposed of before you attempt to push your data back.

Worked for me! Good luck!

No comments:

Post a Comment