Skip to main content

Articles

News

Windows Mobile Developer Controls
Sapphire Soltuions

An overview of SQL Replication options

Written by Jarick Rager  [author's bio]  [read 89172 times]
Edited by Derek

Download the code

Page 1  Page 2  Page 3  Page 4  Page 5  Page 6  Page 7 

Appendix B: Database

Contact

Column Name Data Type Length Allow Nulls IsRowGUID
ContactID uniqueidentifier 16 No Yes
FirstName varchar 50 No No
MiddleName varchar 50 Yes No
LastName varchar 50 No No
Notes varchar 1024 Yes No

conflict_ContactManager_Contact

Column Name Data Type Length Allow Nulls IsRowGUID
ContactID uniqueidentifier 16 No Yes
FirstName varchar 50 No No
MiddleName varchar 50 Yes No
LastName varchar 50 No No
Notes varchar 1024 Yes No
origin_datasource nvarchar 1024 Yes No
conflict_type int 4 Yes No
reason_code int 4 Yes No
reason_text nvarchar 720 Yes No
pubid uniqueidentifier 16 Yes No
create_time datetime 8 No No

Appendix C: modGlobal (PocketPC)

'Replace ContactManager with the name of your
' application.
'Surround by " " as necessary
'Replace JBURDETT_LT with the name of your laptop.
'Surround by " " as necessary
'Class names
Public Const gcsCLASS_REPLICATION As_

String = "SSCE.Replication.1.0"
Public Const gcsCLASS_FILE_SYSTEM _
As String = "FILECTL.FileSystem"
Public Const gcsCLASS_ADOCE_CONNECTION As String = "ADOCE.Connection.3.1"

' Message Box Constants
Public Const gcsMSG_TITLE As String = "ContactManager"

Public Const gcsSUBSCRIBER _
As String = "PPC_ContactManager"
Public Const gcsSUBSCRIBER_CONNECTION_STRING_PREFIX _
As String = "data source="

Public Const gcsLOCAL_DATABASE_FILE _
As String = "\Program Files\ContactManager\database\ ContactManager.sdf"
Public Const gcsSQL_CONNECTION_STRING _
As String = _"Provider=Microsoft.SQLServer.OLEDB.CE.
1.0;Data Source=\Program Files\ ContactManager \database\ ContactManager.sdf"

'Error Constants
Public Const gclERROR_SQL_SERVER_CE_NATIVE_INVALID_SUB _
As Long = 29045
Public Const gclERROR_INVALID_SUBSCRIPTION _
As Long = 10000
Public Const gcsERROR_INVALID_SUBSCRIPTION As _
String = "Invalid Subscription on PocketPC"

Appendix D: modSQLServer (PocketPC)


Download the modSQLServer code

Remember to personalize and add the code below to this module:

Option Explicit
' SQL Server 2000 Application constants
Public Const gcsINTERNET_URL As String = "http://10.10.10.46/"ContactManager"/sscesa10.dll"
Public Const gcsINTERNET_LOGIN As String = ""
Public Const gcsINTERNET_PASSWORD As String = ""
Public Const gcsINTERNET_PROXY_SERVER _As String = "10.10.10.46:80"

Public Const gcsPUBLISHER As String = "JBURDETT_LT"
Public Const gcsPUBLISHER_DB As String = "ContactManager"
Public Const gcsPUBLICATION As String = "ContactManager"
Public Const gcsPUBLISHER_LOGIN As String = "sa"
Public Const gcsPUBLISHER_PASSWORD As String = ""

Public Const gcsDISTRIBUTOR As String = "JBURDETT_LT"
Public Const gcsDISTRIBUTOR_LOGIN As String = "sa"
Public Const gcsDISTRIBUTOR_PASSWORD As String = ""

Previous Page  Next Page