首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Windows Mobile >

vs2005+sql2000 同步获取数据失败

2012-04-16 
【求助】vs2005+sql2000同步获取数据失败在模拟器中访问http://192.168.1.150/sqlce/sscesa20.dll一切正常,I

【求助】vs2005+sql2000 同步获取数据失败
在模拟器中访问   http://192.168.1.150/sqlce/sscesa20.dll   一切正常,IIS没有设置密码,  

创建数据成功了。pull时提示错误!  

   

    public   FormMain()
    {
      InitializeComponent();  

      //
      //   TODO:   Add   any   constructor   code   after   InitializeComponent   call
      //
                        strDBFile   =   string.Format(@ "{0}\Northwind.sdf ",
                                                Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase));
                        strConnLocal   =   string.Format(@ "Data   Source   =   {0} ",   strDBFile);
    }  

   

            private   string   strConnRemote   =   "Provider=sqloledb;   "
                                                                      +   "Data   Source=192.168.1.150;   "  
                                                                      +   "Initial   Catalog=Northwind;   "
                                                                      +   "User   Id=sa;   "
                                                                      +   "Password=sa;   "  
                                                                      +   "Integrated   Security=SSPI; ";  

            //     The   URL
            private   string   strURL   =
                            "http://192.168.1.150/sqlce/sscesa20.dll ";  

   

            private   void   cmdPull_Click(object   sender,   EventArgs   e)
            {  

   

                            SqlCeRemoteDataAccess     rdaNW   =  
                                  new   SqlCeRemoteDataAccess(strURL,   strConnLocal);


                  try  
                  {
                        rdaNW.LocalConnectionString   =   strConnLocal;
                        rdaNW.InternetUrl   =   strURL;
                        rdaNW.InternetLogin   =   " ";
                        rdaNW.InternetPassword   =   " ";
                        rdaNW.Pull( "Categories ",
                                                "SELECT   CategoryID,   CategoryName   "   +  
                                                "     FROM   Categories ",                                    
                                                strConnRemote,
                                                RdaTrackOption.TrackingOnWithIndexes,
                                                "ErrorCategories ");
                        MessageBox.Show( "数据下载成功OK! ");
                  }  
                  catch(   SqlCeException   exSQL   )
                  {  
                        HandleSQLException(exSQL);
                  }  
                  finally  
                  {
                        rdaNW.Dispose();
                  }  

        }  

   

提示错误:An   internal   error   occurred,[ID,,,,]
Microsoft   SQL   Server   2000   Windows   CE   Edition  

用户‘MDMDDD\IUSR_MDMDDD33’登录失败。:Microsoft   OLE   DB
Provider   for   SQL   Server  



[解决办法]
登陆SQL Server 报错了
[解决办法]
你的连接有问题:
"Provider=sqloledb; "
+ "Data Source=192.168.1.150; "


+ "Initial Catalog=Northwind; "
+ "User Id=sa; "
+ "Password=sa; "
+ "Integrated Security=SSPI; ";

热点排行