pull method
- From: ss <ss@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 18 Jul 2006 04:35:01 -0700
Hi,
Following is the code snippet
class RDA
{
private static string _serverName = "seed";
private static string _databasePath = @"My Documents\rda.SDF";
private static string _localConnectionString = "Data Source=" +
_databasePath;
private static string _internetUrl =
"http://seed/sharefolder/sqlcesa30.dll";
private static string _remoteConnectionString="Data Source=seed;Initial
Catalog=AdventureWorks;User ID=sa;Password=P@ssw0rd";
public static void Main(string[] args)
{
try
{
MessageBox.Show("Starting Pull", "RDA Lab");
Pull();
//
}
catch (SqlCeException ce)
{
ShowErrors(ce);
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
finally
{
MessageBox.Show("Pull and Push Complete", "RDA Lab");
}
}
private static void CreateDatabase()
{
// Create a local database
if (System.IO.File.Exists(_databasePath))
{
System.IO.File.Delete(_databasePath);
}
SqlCeEngine engine = new SqlCeEngine(_localConnectionString);
engine.CreateDatabase();
}
private static void Pull()
{
// Pull down the authors table from the pubs database on the remote
server
CreateDatabase();
SqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess(_internetUrl,
_localConnectionString);
rda.Pull("ContactCE", "select FirstName,Lastname from
Person.contact", _remoteConnectionString,
RdaTrackOption.TrackingOn);
rda.Dispose();
}
}
The error encountered is Error code : 80072F76
Message: Header information is either corrupted or missing
Minor error : 28035
I can browse to the SQL server mobile agent from my emulator with the same
internetUrl in the code snippet without any error
Thanks
SS
.
- Follow-Ups:
- Re: pull method
- From: Hilary Cotter
- Re: pull method
- Prev by Date: Re: Transactional Replication from 2000 to 2005 not synchronizing
- Next by Date: Re: SQL Mobile / Merge Replication Conflict Resolver Not Applied
- Previous by thread: Re: SQL Mobile / Merge Replication Conflict Resolver Not Applied
- Next by thread: Re: pull method
- Index(es):
Relevant Pages
|