Skip to Content
0
Former Member
Jan 25, 2005 at 01:04 AM

Problems using RecordSet Object in SBO 2004

37 Views

Hi,

When of one of our testers runs any code that uses the RecordSet object, they always get a null object when reading the record results. The code is:

string Query = string.Format("SELECT COUNT(TABLE_NAME) TOTAL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' " +

"AND TABLE_NAME = ''", TableName);

int result = 0;

IRecordset RS = (IRecordset)BaseUI.oCompany.GetBusinessObject(BoObjectTypes.BoRecordset);

RS.DoQuery(Query);

if (RS.RecordCount > 0)

{

RS.MoveFirst();

result = (int)RS.Fields.Item("TOTAL").Value; //problem is here, it is always null for our tester

}

The returned results in the RS object are always null.

However I can run the code on my computer without any problems. We are not running the add-on as a registerd add-on as we are still in the midst of testing.

Has anyone else experienced similar problems or know of the cause or a solution?

Lita

Message was edited by: Lita Teng