GetChanges error

Jul 17, 2009 at 1:44 AM

Hello,

I too am fairly new to Sync/WCF.  I've installed the projects, created db's, configured for my local IP.

Getting a 'TARGETINVOCATIONEXCEPTION' error during the sync.  Debugging looks like it's happening

when the GetChanges method is called, specific error is a 'Failed to Convert Parameter value from Int64

to a Byte[].

Something to do with the usp_GetNewBatchAnchor stored procedure, I think it might be something being

returned in the Group Metadata but not sure?  FYI - I am not using integrated Change

Tracking, wondering if there might be additional changes I may need to include if using custom change

tracking?

Any ideas appreciated (By the way, thanks for this project, it's been a huge help).

Scott

Coordinator
Jul 17, 2009 at 12:28 PM

Hi slang7,

At first, thank you for your kind of words.

I'm afraid there is an error on database_schema.sql since usp_GetNewBatchAnchor doesn't peak out between Change and Custom tracking.

I've just created new item in Issue Tracker panel so as far as I'll be able that issue will be solved. Instead, take a look at this link where you'll find how usp_GetNewBatchAnchor looks like if used for custom tracking.

Please let me know if this is usefull for you.

Thanks,

José Miguel Torres

Jul 20, 2009 at 5:14 PM

Thank you, definately helpful.

Jul 23, 2009 at 9:37 AM
Edited Jul 23, 2009 at 9:39 AM

This issue can be temporary fixed by changing from SqlDbType.BigInt to SqlDbType.Timestamp in initialization of selectNewAnchorCommand variable in  AppRemoteProviderBase() constructor in AppRemoteProviderBase.cs

Coordinator
Jul 23, 2009 at 1:42 PM

Hi gjakutin,

That's true, but be carefull since usp_GetNewBatchAnchor has got SQL Server 2008 specific T-SQL functions for Change Tracking feature. So, although you are changing SqlDbType.BigInt to SqlDbType.Timestamp anchor will not run properly.

Thanks for your appreciation,,


José M. Torres