怎么会这样啊
我的第一个问题成功在此解决,非常感谢给我回复,sqlce连接问题我在作一个手持机,通过手持机的sqlce于pc机的sql server 2000相连,pc机上装上sqlce,IIS,成功配置端口,能够连接到服务器,但是,通过手持机连接不到数据库,有作这项工作的高手给个例子好吗?或者给出思路,附我的代码如下:
void Synch()
{
SqlCeReplication repl = null;
try
{
// Set the Replication object
repl = new SqlCeReplication();
repl.InternetUrl = "<http://10.1.15.221/sqlce/sscesa20.dll>;";
repl.InternetLogin = "";
repl.InternetPassword = "";
repl.Publisher = "HOUJG";
repl.PublisherAddress ="10.1.15.221,80";
repl.PublisherDatabase = "Matter";
repl.PublisherLogin = "sa";
repl.PublisherPassword = "sa";
repl.Publication = "Matter";
repl.Subscriber = "SQLCENETCF";
repl.SubscriberConnectionString = "Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\\my documents\\SQLCECF.sdf";
// Create the Local SSCE Database subscription
repl.AddSubscription(AddOption.ExistingDatabase);
// Synchronize to the SQL Server 2000 to populate the Subscription
repl.Synchronize();
}
catch(SqlCeException)
{
// Use your own error handling routine to show error information.
}
finally
{
// Dispose of the Replication Object
repl.Dispose();
}
}