1 Reply Latest reply on Aug 5, 2003 3:12 PM by 82532

    Why can not I use oledbdatasetcommand

    375175
      The program below,when I run,it said:BC30002: undefined type“OleDbdataSetCommand".But "OleDbCommand","oledbconnection" and "oledbdatareader" can use.
      Program:
      <%@ import namespace="system.data" %>
      <%@ import namespace="system.data.oledb" %>
      <%
      dim strconnstring as string
      strconnstring="provider=oraoledb.oracle.1;user id=scott;password=tiger"
      dim objconn as oledbconnection
      objconn=new oledbconnection
      objconn.connectionstring=strconnstring
      objconn.open()
      dim strsql as string="select * from student"
      dim objdscommand as OleDbdataSetCommand
      dim objdataset as dataset=new dataset
      objdscommand=new oledbdatasetcommand(strsql,objconn)
      objdscommand.filldataset(objdataset,"author information")
      objconn.close()
      objconn=nothing
      authors.datasource=_objdataset.tables("author information").defaultview
      authors.databind()
      %>
      <html><body><asp:datagrid ID="authors" runat="server"/></body></html>