N
nono
Hello,
i use SqlCeRemoteDataAccess() and Pull method to
synchronise SQL CE and SQL 2000 databases.
When i click the first time on the "synchronize" button,
it works well and it's very fast. It creates the table on
the PDA and insert datas.
When i click the second time on the button, it fails with
the following error message :
"The LocalTableName parameter is already specified.
[,,, Table name,,]".
Why ?
Any idea ? (see the code below)
Thanks
nono
private void button2_Click(object sender, System.EventArgs
e)
{
// Connection string to the instance of SQL Server
string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=YOURDATASOURCE;Initial Catalog=YOURCATALOG; " +
"User Id=sa;Password=sa";
// Oracle connection's string
//string rdaOleDbConnectString
=@"Password=YOURPASSWORD;User ID=YOURUSER;Data
Source=YOURDATASOURCE";
// Initialize the RDA object.
SqlCeRemoteDataAccess rda = null;
try
{
//Try the Pull operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "YOUR LOGIN";
rda.InternetPassword = "";
rda.InternetUrl
= "http://YOURSERVER/sqlce/sscesa20.dll";
rda.LocalConnectionString
= "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source="
+ @"\my documents\YOURFILE.sdf";
Int32 inter = Environment.TickCount ;
rda.Pull("DESTINATIONTABLE","Select FIELDS from
SOURCETABLE",
rdaOleDbConnectString,
RdaTrackOption.TrackingOff ); /* ,
"ErrorTable");*/
Int32 timeTaken2 = Environment.TickCount-inter ;
MessageBox .Show ("Load time: "+timeTaken2.ToString ());
}
catch(SqlCeException EX)
{
//Use your own error handling routine.
MessageBox .Show (EX.Message );
}
finally
{
//Dispose of the RDA object.
rda.Dispose();
}
}
i use SqlCeRemoteDataAccess() and Pull method to
synchronise SQL CE and SQL 2000 databases.
When i click the first time on the "synchronize" button,
it works well and it's very fast. It creates the table on
the PDA and insert datas.
When i click the second time on the button, it fails with
the following error message :
"The LocalTableName parameter is already specified.
[,,, Table name,,]".
Why ?
Any idea ? (see the code below)
Thanks
nono
private void button2_Click(object sender, System.EventArgs
e)
{
// Connection string to the instance of SQL Server
string rdaOleDbConnectString = "Provider=sqloledb; Data
Source=YOURDATASOURCE;Initial Catalog=YOURCATALOG; " +
"User Id=sa;Password=sa";
// Oracle connection's string
//string rdaOleDbConnectString
=@"Password=YOURPASSWORD;User ID=YOURUSER;Data
Source=YOURDATASOURCE";
// Initialize the RDA object.
SqlCeRemoteDataAccess rda = null;
try
{
//Try the Pull operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetLogin = "YOUR LOGIN";
rda.InternetPassword = "";
rda.InternetUrl
= "http://YOURSERVER/sqlce/sscesa20.dll";
rda.LocalConnectionString
= "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source="
+ @"\my documents\YOURFILE.sdf";
Int32 inter = Environment.TickCount ;
rda.Pull("DESTINATIONTABLE","Select FIELDS from
SOURCETABLE",
rdaOleDbConnectString,
RdaTrackOption.TrackingOff ); /* ,
"ErrorTable");*/
Int32 timeTaken2 = Environment.TickCount-inter ;
MessageBox .Show ("Load time: "+timeTaken2.ToString ());
}
catch(SqlCeException EX)
{
//Use your own error handling routine.
MessageBox .Show (EX.Message );
}
finally
{
//Dispose of the RDA object.
rda.Dispose();
}
}