SQL Mobile如何实现同步
下面是我写的SQL mobile 与SQL 2000同步 ,运行程序时总是出现"运行IIS的计算机出错,请尝试重新启动IIS服务器。"。
已经重启了很多次了,还是不行。
在浏览器中能“http://127.0.0.1/SQLCE/sqlcesa30.dll”打开它,显示:SQL Server Mobile Server Agent 3.0
SQL server 数据库已经添加了IUSR_用户。
哪位大哥知道是怎么回事吗?或者哪里配置有错误。
另外哪位可以发个SQL mobile同步例题给我吗?Mail:feishanmin@163.com
万分感谢!!!
public void CaseSynchronizationS()
{
// Connection String to the SQL Server.
string rdaOleDbConnectString = "Provider=sqloledb; Data Source=PPC;Initial Catalog=Northwind; " + "User Id=sa;Password=fei";
// Initialize RDA Object.
SqlCeRemoteDataAccess rda = null;
try
{
//Try the Pull Operation.
rda = new SqlCeRemoteDataAccess();
rda.InternetUrl = "http://127.0.0.1/SQLCE/sqlcesa30.dll";
rda.LocalConnectionString = ("Data Source ="
+ (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
+ ("\\ajData.sdf;"
+ ("Password =" + "\"fei\";"))));
rda.Pull("ss", "select sname,ssex from s ", rdaOleDbConnectString,RdaTrackOption.TrackingOnWithIndexes);
}
catch (Exception msex)
{
MessageBox.Show(msex.Message.ToString());
}
finally
{
//Dispose of the RDA Object.
rda.Dispose();
}