你打印的数据是dataenviroment调用的,和adodc1没关系!你将dataenviroment的数据源的Command改为sql="select * from box where 编号='26 '"就可以了

解决方案 »

  1.   

    那如果我想打印的语句有两种情况呢!   adodc1.connectstring="dsn=pb"
       adodc1.commandtype=adcmdtext
      if text4.text<> "" then
       adodc1.recordsource="select * from box where 编号='text4.text '"
     else 
      adodc1.recordsource="select * from box where 序号=max "
    这段代码写在哪儿?
      
      
      

  2.   

    private sub cmbshow_click()
       adodc1.connectstring="dsn=pb"
       adodc1.commandtype=adcmdtext
       adodc1.recordsource="select * from box where 编号='26 '"
       set rptbox.datasource=adodc1.Recordset
      rptbox.show
     end sub
      

  3.   

    在set rptbox.datasource=adodc1后
    但rptbox的datamember应该在哪儿设呢!
    rptbox里的那些需要显示数据库数据的textbox应该怎样进行绑定呢?