index > SQL Server Everywhere Edition > Using Push in RDA for sync the data from sql mobile to sql serve...

Using Push in RDA for sync the data from sql mobile to sql serve...

Hi Everyone,

I have tried the Sync the data from sql server mobile (.SDF) to Sql server 2005 (.mdf).In push command, i am getting the error "Sql Server Everywhere encountered problems when opening the database".

string rdaOleDbConnectString = @"Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=master;Data Source=PRASSANA\PRASANNA;Password=master";
qlCeRemoteDataAccess rda = null;
try
{
rda = new SqlCeRemoteDataAccess();
rda.LocalConnectionString = "Data Source=D:/DATABASE/test.sdf";
rda.InternetUrl = http://localhost/Dataset/sqlcesa30.dll;
rda.Push("company", rdaOleDbConnectString, RdaBatchOption.BatchingOn);
MessageBox.Show("Completed");

}

catch (SqlCeException)

{

}

finally

{

rda.Dispose();

}

please guide me any one ours guys to solve this problem .

Thanks

Prasanna.




sql mobile edition
prasannadotnet

A few problematic things I see here in your code:

1. try Provider=SQLOLEDB (not sure why you have .1 suffix on there)

2. the InternetURL must be in quotes and cannot be localhost - it should be http://{ipAddressOfYourServer}/{virtualdirectoryName}/sqlcesa30.dll

3. do you really mean to try to push a table into the master database? your intial catalog in the connection string indicates that this is your intention

4. you cannot push until you pull with tracking on

Darren




.NET Compact Framework MVP
Darren Shaffer

Hi Darren,

Thanks! As per your guidance, i have tried in the pull method.Now i am getting error "The LocalTablename parameter is already specified".

Coding as follows:

string rdaOleDbConnectString = @"Provider=SQLOLEDB; Data Source=PRASSANA\PRASANA;Initial Catalog=master;User Id=sa;Password=master";
SqlCeRemoteDataAccess rda = null;
try
{
rda = new SqlCeRemoteDataAccess();
rda.LocalConnectionString = "Data Source=E:\\SampleTest.sdf";
rda.InternetUrl = "http://192.168.1.118/TEst/sqlcesa30.dll";
rda.InternetLogin = "IUSR_PRASSANA";
rda.InternetPassword = "PRASSANA";
rda.Pull("company", "Select * from company", rdaOleDbConnectString, RdaTrackOption.TrackingOn);
MessageBox.Show("Pull Method");
}
catch (SqlCeException)
{
Message.show(ex.message);
}
finally
{
// Dispose of the RDA Object
//
rda.Dispose();
}
}
Please guide me in detail, what mistake i have done in this method.

Thanks ,

Prasanna.




sql mobile edition
prasannadotnet
reply 3

You can use google to search for other answers

 

More Articles

• Corrupt SQLCE 2.0 Database File
• SCOPE_IDENTITY()
• Determining if a SqlCeDataReader has returned data from a SELECT ...
• How many Mobile DB's can sync with one server?
• Working with data in a mobile solution
• How to create a SQL ev DB?
• info about sql server 2005 everywere
• Compact Sql Mobile 3.0 DataBase in C++/OLE DB ?
• Using SqlCeEngine to verify/Restore a database
• SQL MOBILE ERROR 28037
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• genral network error on .net framework 1
• SQL Everywhere, ntext & ADO Classic
• ANN: VistaDB 3 as world's first managed
• Bulk import data to SQL Mobile
• Synchronize SQL Mobile 2005 using Active
• SqlCeRemoteDataAccess Pull issue with Co
• MDB to SDF
• Getting replication to work on Windows 2
• unable to connect to SQL Everywhere in V
• installing sql server mobile in an hp ip
• SQL CE Push ConnectTimeout
• Creating and deploying sql mobile databa
• synchronize sql mobile (vs 2005) and sql
• Strange Problem: .sdf 128MB filesize limit
• Very newbie question

Hot Articles

• Microsoft SQL Server Mobile Edition data
• Problem adding new Database in Smart app
• need to edit .sdf files from local desktop
• Strange Problem: .sdf 128MB filesize limit
• SQL Server Mobile Bug?
• Client-side programming patterns/idioms
• Using Select In Push Command
• Inserting dataset values into SQL Mobile
• Need help regarding Replication between
• Inserting data from one table to another
• [Ask]Getting files from pocket pc emulat
• .sdf deployment problem VS2005
• How do I drop sql server mobile database
• SQL 2005 Mobile loading 2003 Cabs
• SQL Mobile Installation Problem on Device

Recommend Articles

• Parameterized queries with RDA
• Creating PK/FK Relationship
• *.mdf to *.sdf
• RDA and sql server mobile database
• Has anyone noticed a size difference bet
• ssevaccesssync service does not start
• HostName and ReinitializeSubscription
• ANYONE CAN HELP ME PLEASE?
• How do I install SQL Server Management S
• Error While Installing SQLServer CE
• How to store large chunks for binary dat
• operating system does not support encryp
• Insert GUID into SQL Mobile Database tab
• SQL Server Mobile subscription problem
• Create a Mobile database on desktop