asp.net2.0  中.xsd数据集文件dataset 中可以或应该放多少个表合适?是把数据库中所有表都放在里面吗?如果不是,有什么样的放置原则,一个项目要几个 .xsd数据集文件?如果把aa.xsd數據集文件放三個表,設計crystal Report時,用aa.xsd文件內三個表,這個有問題嗎?

解决方案 »

  1.   

               
    如果我用dataset作crystalreport數據源就出現:登入失敗 crdb_adoplus : 並未將物件參考設定為物件的執行個體檔案 C:\WINDOWS\TEMP\IRVV {BB87F49C-2B5C-42A2-B459-A4023B498BB5}.rpt 錯誤: 無法連接: 登入參數錯誤。
    如果我改為datatable作數據源就沒有問題呢?麻煩幫看看是什麼問題呢?
        protected void bindH()
        {
            string s = Request.QueryString["no"].ToString();
            this.rptDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            HashMap param = new HashMap();
            param.add("@vou_no3", s);
            TIOUtils tio = new TIOUtils(GetWhOrStore.dbcate(), "sale_pro_select_instockmReportV", param);
            try
            {
                DataSet set = GetWhOrStore.dao().GetRunStoreProcedureDataSet(tio);
                if (set.Tables[0].Rows.Count > 0)
                {
                    this.rptDocument.Load(Server.MapPath("IRVV.rpt"));
                    this.rptDocument.SetDataSource(set);
                    rptDocument.SetDatabaseLogon("sa", "webst01");                this.CRVImport1.ReportSource = rptDocument;
                    this.CRVImport1.DataBind();            }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "success", "alert('無資料');", true);
                }
            }
            catch (Exception ex)
            {
                new Logger(GetWhOrStore.dbcate()).Log(ex.Message, Logger.ERROR);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "success", "alert('" + ex.Message + "');", true);
            }
        }