.net - Getting the SyncSession.SyncNewReceivedAnchor -


i trying sync new received anchor stored in server side database. purpose store time stamp in have received data client. achieve using following command:

    sqlcommand selectnewanchorcommand = new sqlcommand();     string newanchorvariable = "@" + syncsession.syncnewreceivedanchor;     selectnewanchorcommand.commandtext = "select " + newanchorvariable + " = getutcdate()";     selectnewanchorcommand.parameters.add(newanchorvariable, sqldbtype.datetime);     selectnewanchorcommand.parameters[newanchorvariable].direction = parameterdirection.output;     selectnewanchorcommand.connection = serverconnection;     this.serverprovider.selectnewanchorcommand = selectnewanchorcommand; 

and once receive th anchor using in following way:

sqlcmdtransactionmaster.parameters.add("@" + syncsession.syncnewreceivedanchor, sqldbtype.datetime); output should "current date" getting following date

"1753-01-01 12:00:00.000"

this date default date available in sql server.

environment : visual studio 2008 , sync framework 2.1 & sql server 2008 (with tracking false)

the purpose of whole exercise server date in table when record inserted in server. there other way of getting done?

please let me know going wrong in this:

thanks in advance biju melayil

i think change tracking enabled , using change tracking function change_tracking_current_version() - http://msdn.microsoft.com/en-us/library/bb933945.aspx

this example explains lot: http://msdn.microsoft.com/en-us/library/cc305322.aspx

but maybe enabling change tracking not option you?


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -