Here's a sample I'd cooked up some time ago on my machine.
Just create a file named simple.cs with the code above in it, and then complile it with something similar to :
answered 09 Nov '10, 14:25 Reg Domaratzki Woohoo! I can move The Big Green Arrow! 2
I think real .NET programmers might actually verify the args[0] parameter before passing it into a ConnString, and would likely break up the code into multiple try/catch blocks, but this sample does show setting up SyncParms in the ULConnection object and then making use of the SyncResult object to check results. I'll leave "making it pretty" as an exercise for the student. :) |
If you want an application along with the full source code, have a look at the AdventureWorks Windows Mobile samples here: http://www.sybase.com/detail?id=1065480 It contains an UL.NET sample and you can see some of the code right on that web page. You can also download the complete Visual Studio project. José answered 13 Sep '10, 21:23 José Ramos That sample uses cmd.CommandText = "SYNCHRONIZE PROFILE SalesMobile"; instead of conn.Synchronize(); and it makes no reference to SyncParms. |
Documentation:
More: http://dcx.sybase.com/index.html#1200en/uldotnet/uljavadotnet-development-s-5339942.html answered 13 Sep '10, 19:37 Josh Savill Comment Text Removed
Comment Text Removed
2
That Help topic comes with no supporting explanation... plus, conn.SyncParms.StreamParms = ""; really should be "host=..." in order to be useful. 2
Not a big fan of this sample either, since there's no context for the conn object. I know it's a ULConnection object, but there's no way to see that in the sample. I've added a comment on DCX to at least change the method signature to "private void Sync( ULConnection conn )" |