G
Guest
In following code,how to create a database with password
SqlCeReplication rep=new SqlCeReplication(
@"http://GRWEBSERVER/virdir/sscesa20.dll",
"username","password",
"GRWEBSERVER",
"SCDATA_PDA",
"SCDATA_PDA_PUBLICATION",
"kasj1",
@"Data Source=\My Documents\aaa.sdf" );
try
{
if(!System.IO .File.Exists (@"\My Documents\aaa.sdf"))
{
rep.AddSubscription (AddOption.CreateDatabase );
}
rep.Synchronize() ;
MessageBox.Show("successful");
}
catch(SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
finally
{
rep.Dispose();
}
thx anyway
SqlCeReplication rep=new SqlCeReplication(
@"http://GRWEBSERVER/virdir/sscesa20.dll",
"username","password",
"GRWEBSERVER",
"SCDATA_PDA",
"SCDATA_PDA_PUBLICATION",
"kasj1",
@"Data Source=\My Documents\aaa.sdf" );
try
{
if(!System.IO .File.Exists (@"\My Documents\aaa.sdf"))
{
rep.AddSubscription (AddOption.CreateDatabase );
}
rep.Synchronize() ;
MessageBox.Show("successful");
}
catch(SqlCeException ex)
{
DisplaySQLCEErrors(ex);
}
finally
{
rep.Dispose();
}
thx anyway