Replication with SQL Mobile

M

mfahnestock

Hi all! Having a major quandry and looking for some support. Please
help.

Here's the goal:
* PocketPC device gathers various data and needs to merge with
Enterprise SQL Server
* I have the replication working at home, but I need to migrate to
another computer, but suddenly I am getting the wonderful 80072EFF
error.

I have researched this for days and it appears that the 80072EFF error
is due to lack of internet connectivity, which is odd as I have a solid
internet connection through the PocketPC when connecting through
Microsoft ActiveSync.

Currently, I am utilizing a SQL Server 2000 SP4 merge publication with
the SQL Mobile device as an anonymous subscribers. I have the SQL
Agent running message when using "http://[IP
Address]/ARC_PUSH/sqlcesa30.dll."

What I tried to do is disconnect my Internet connection and try to
replicate data directly through the MS Activesync connection, but this
is not working. Here is the snippet from my code in VB 2005:

<<DB Creation Code>>
Cursor.Current = Cursors.WaitCursor
' Determines if a DB exists, if so, it deletes it and
rebuilds.
If File.Exists(LOCALDATABASE) Then
If MessageBox.Show("Are you sure you wish to create a
new database? WARNING: This will delete any existing data.", _
"Warning", MessageBoxButtons.YesNo,
MessageBoxIcon.None, MessageBoxDefaultButton.Button1) =
Windows.Forms.DialogResult.Yes Then
File.Delete(LOCALDATABASE)
Else
Cursor.Current = Cursors.Default
Exit Sub
End If
End If

engine.CreateDatabase()
ReplicateData()

Cursor.Current = Cursors.Default
MessageBox.Show("Replica database created", _
"Replicated", _
MessageBoxButtons.OK, _
MessageBoxIcon.None, _
MessageBoxDefaultButton.Button1)

<<ReplicateData Function>>
'Sets parameters for replication
Dim replicator As New SqlCeReplication()
replicator.InternetUrl = INTERNETURL
replicator.Publisher = PUBLISHERSERVER
replicator.PublisherDatabase = PUBLISHERDATABASE
replicator.PublisherSecurityMode = _
PUBLISHERSECURITYMODE
replicator.Publication = PUBLICATION
replicator.Subscriber = SUBSCRIBER
replicator.SubscriberConnectionString = _
CONNECTIONSTRING
replicator.Synchronize()

The values are set through an .ini file that I created. If the cable
is plugged in and I change to the IP address of the LAN, it works fine.
If I unplug the cable and change the IP address to the Activesync
connection. It bombs.

Any ideas?

Mark
 
D

Darren Shaffer

Mark,

The computer running IIS must have an IP address in order for replication to
work.
You can use the Microsoft Loopback Adapter if you cannot establish a
physical
network connection/address to overcome this. Instructions for installing
the loopback
adapter are available on MSDN.

Also - there is a public newsgroup and an MSDN forum just for SQL Mobile
questions:

microsoft.public.sqlserver.ce
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com

Hi all! Having a major quandry and looking for some support. Please
help.

Here's the goal:
* PocketPC device gathers various data and needs to merge with
Enterprise SQL Server
* I have the replication working at home, but I need to migrate to
another computer, but suddenly I am getting the wonderful 80072EFF
error.

I have researched this for days and it appears that the 80072EFF error
is due to lack of internet connectivity, which is odd as I have a solid
internet connection through the PocketPC when connecting through
Microsoft ActiveSync.

Currently, I am utilizing a SQL Server 2000 SP4 merge publication with
the SQL Mobile device as an anonymous subscribers. I have the SQL
Agent running message when using "http://[IP
Address]/ARC_PUSH/sqlcesa30.dll."

What I tried to do is disconnect my Internet connection and try to
replicate data directly through the MS Activesync connection, but this
is not working. Here is the snippet from my code in VB 2005:

<<DB Creation Code>>
Cursor.Current = Cursors.WaitCursor
' Determines if a DB exists, if so, it deletes it and
rebuilds.
If File.Exists(LOCALDATABASE) Then
If MessageBox.Show("Are you sure you wish to create a
new database? WARNING: This will delete any existing data.", _
"Warning", MessageBoxButtons.YesNo,
MessageBoxIcon.None, MessageBoxDefaultButton.Button1) =
Windows.Forms.DialogResult.Yes Then
File.Delete(LOCALDATABASE)
Else
Cursor.Current = Cursors.Default
Exit Sub
End If
End If

engine.CreateDatabase()
ReplicateData()

Cursor.Current = Cursors.Default
MessageBox.Show("Replica database created", _
"Replicated", _
MessageBoxButtons.OK, _
MessageBoxIcon.None, _
MessageBoxDefaultButton.Button1)

<<ReplicateData Function>>
'Sets parameters for replication
Dim replicator As New SqlCeReplication()
replicator.InternetUrl = INTERNETURL
replicator.Publisher = PUBLISHERSERVER
replicator.PublisherDatabase = PUBLISHERDATABASE
replicator.PublisherSecurityMode = _
PUBLISHERSECURITYMODE
replicator.Publication = PUBLICATION
replicator.Subscriber = SUBSCRIBER
replicator.SubscriberConnectionString = _
CONNECTIONSTRING
replicator.Synchronize()

The values are set through an .ini file that I created. If the cable
is plugged in and I change to the IP address of the LAN, it works fine.
If I unplug the cable and change the IP address to the Activesync
connection. It bombs.

Any ideas?

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top