Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.4k

Error - Message = "Data source is an invalid type.

Dec 28 2023 6:45 AM

Hi

Message = "Data source is an invalid type.  It must be either an IListSource, IEnumerable, or IDataSource."

         SAPbobsCOM.SBObob obj = _oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
            SAPbobsCOM.Recordset rs = _oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
            rs = obj.GetBPList(SAPbobsCOM.BoCardTypes.cCustomer);

            int count = rs.RecordCount;
            rs.DoQuery("SELECT CardCode,CardName FROM OCRD");
            grdBP.DataSource = rs;
            grdBP.DataBind();

Thanks

 


Answers (7)