I have been trying to make a mobile application.
I am using VS 2005 with Sp2 (Professional Edition)
SQL Server 2005 (Developer Edition)
SQL Server CE 3
I have created a small database in SQL Server 2005 and a small CE database. To sync both databases, I can understand that In I need merge replication. So I have created a publication and then a subscription with the .sdf file. I did perform web synchronization with my publication.
My question is: In my application I am trying to synchronize my local sdf file. The code I am using was generated when I have created subscription. I made small changes as mentioned in msdn.
When I deploy my application in my device (connected to my PC through usb) the application runs fine but WITHOUT synchronizing and giving me NO ERROR! I need help in this regard.
I was trying to use the same code to synchronize my server database with the changes made in CE database at the end of saving data in local dataset. In this case I just use the same sub in the edit data page but removed a line of code and that is: "repl.AddSubscription(AddO
But my CE database is not synchronized after the changes I made. But I can synchronize subscription from Management Studio with no issue.
I need help as I am newbie working on my first application. The pieces of code,I used is given below for reviews/suggestions:
Dim filename As String = "\Program Files\PCI_Scanner\ITinvent
Dim repl As New SqlCeReplication()
repl.InternetUrl = "http://PCI1835/ITinventory/sqlcesa30.dll
repl.Publisher = "PCI1835"
repl.PublisherDatabase = "ITinventory"
repl.Publication = "ITINVENTORY"
repl.Subscriber = "ITINVENTORY"
tring = "Data Source=""\Program Files\PCI_Scanner\ITinvent
Database Size=128;Default Lock Escalation =100;"
Catch err As SqlCeException
ng + err.StackTrace)
Any help will be greatly appreciated. Thanks!