Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.2k

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)