当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·access数据库删除问题    »显示摘要«
    摘要: 请问如果用代码实现将access数据库一次全部清空,并且自动编号字段的值也重新从1开始计算?等于是执行了压缩和修复数据库操作. ......
    摘要: 给分100 ......


在crystal report中我绑定两个表到DATASET中,table[1]空时table[0]的数据也没有显示,为什么

代码如下:  
  private   void   Viewer()  
  {  
  CrystalReport1   oRpt;   //   create   new   report   object    
  oRpt   =   new   CrystalReport1();//     create   new   instance   of   the   report   object    
  SQL_paper="SELECT   *   FROM   stock   where   name="   +   DropDownList1.SelectedItem.Text   +   "";  
  oleDbDataAdapter1.SelectCommand.CommandText=SQL_paper;  
  oleDbDataAdapter1   =   new   OleDbDataAdapter(SQL_paper,oleDbConnection1);  
  oleDbDataAdapter1.Fill(dataSet21.Tables[0]);  
  int_year=Convert.ToInt16(DropDownList2.SelectedItem.Text);  
  SQL_ream_s="SELECT   date,   day_r,   day_s,   night_r,   night_s,   rcv_r,   rcv_s,   bal_r,   bal_s,   phy_r,   phy_s,   remarks,   name   FROM   dbo.transac     where   name="+DropDownList1.SelectedItem.Text.Trim()   +"   and   month(date)="+int_month+"   and   year(date)="+int_year   ;  
  oleDbDataAdapter2   =   new   OleDbDataAdapter(SQL_ream_s,oleDbConnection1);  
  oleDbDataAdapter2.Fill(dataSet21.transac);  
  oRpt.SetDataSource(dataSet21);   //   set   the   reports   data   source    
  CrystalReportViewer1.ReportSource   =   oRpt;   //   set   the   viewers   report   source   to   out   report   object    
  CrystalReportViewer1.SeparatePages=false;  
  CrystalReportViewer1.DisplayToolbar=false;  
  CrystalReportViewer1.DataBind();   //   bind   the   report   object   and   data   to   the   report   viewer  
  }

NO.1   作者: souther

可能你这两个表有相同的字段,才会出现这种情况.


    摘要: 想在vb中调用vc做的功能模块, 如对数据库的再一层封装:将代码库封装成api,给vb使用。 是做成dll合适还是做成控件合适? 劳驾各位高手指点迷津^_^ 分数必回 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE