RDA Push error 29025


I´m developing a Windows Mobile application and have a Pull() of 5 tables with tracking on and index, and have more about 15 tables with tracking off.

So in other place I have an event that do a Push() of this 5 tracked tables. All was ok with this Push() unil now, but I don´t know why I´m gettiing the error 29025 SSCE_M_VF_MISSINGSERVERPKCOLUMN that mean: "The push operation cannot find a primary key column on the SQL Server table."

The problem is that I checked many times if the 5 tables at server have the same primary key than SQL CE and YES, the tables schema are exactly the same. Then I deleted the SDF database and made a compelte Pull to ensure database schema... and I get the same problem 29025.

Any ideas about why this can happen? SQL Server is 2008, SQL CE is 3.1, the SQL CE native of Windows Mobile 6.0 with native netcf 2.0. Server agent is sqlcesa35.dll.

As I remember, NOTHING was changed at SQL Server since last time I see Push running ok. And the only thing changed at Windows Mobile is that AFTER the 5 tables Push now I have some another mobile database data processing.

I can´t find NOTHING about SSCE_M_VF_MISSINGSERVERPKCOLUMN at google, except MSDN page about error range...
Eternal_BardSenior DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eternal_BardSenior DeveloperAuthor Commented:
I found the problem. It´s all about schema miss managed by RDA.

At server, I have 2 tables Schema1.Table1 and Schema2.Table1, so RDA Pull Table1 from schema1, because SQL userid used by RDA is an userId that has access just to Schema1, and is it´s default Schema.

But when RDA makes a Push, using SQL Profile I found that 2 procedures are executed:

EXECUTE sp_columns_rowset N'Table1',NULL,NULL
EXECUTE sp_primary_keys_rowset N'Table1',NULL

Parameter 2, that is NULL, is the SchemaName. So RDA could have schema parameter but hasn´t. And pass NULL instead. SQL Server then returns rows of columns and primary keys from both Table1, from Schema1 and Schema2 and this causes the error 29025 (SSCE_M_VF_MISSINGSERVERPKCOLUMN).

I checked for constraint PK names to be different between Schema1.Table1 and Schama2.Table1 and do not solved.

Then I changed the names of tables from Schema2, and the problem was workarounded.
Creation os Synonym wasn´t useful too. Just change table names to make them unic for the procedures sp_columns_rowset and sp_primary_keys_rowset that accept schema name but RDA don´t know how to manage schemas and pass it to procedure.

RDA could store schema at ce local system tables, it has fields for it. Or RDA could accept to pass schema with table name or as a new parameter. But that is: Do not use tables with same names of another table from anoter schema. Use always unique names between differente schemas for sync with RDA.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.