Skip to Content
author's profile photo
Former Member

Blank row in DBDataSource

I have a DBDataSource that I am frequently re-querying and I am getting a blank row from somewhere. I purposely used a value that would not match any rows and I still get one blank row in the data source.

conditions = new SAPbouiCOM.Conditions();

condition = conditions.Add();

condition.Alias = "DocKey;

condition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;

condition.CondVal = "9999";

dbds = sboForm.DataSources.DBDataSources.Item(TABLE_NAME);


string test;

test = dbds.size.ToString();

The test value equals 1 and the column values are all empty. Is this a bug? Am I missing something?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 20, 2004 at 09:21 AM

    It certainly is a pain and is quite inefficient to work around it. Thankfully it is being changed in version 2004. The following is an extract from the 2004 compatibility list:-

    "When query result gives no data the corresponded DB data source size is set 0 (at initialization the size is set to 1)."


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Your spot on with that - as I said, it is very inefficient to work around.

      I tend to use the first option, add the row to the matrix, test a key value and delete the row again if the value isn't set.

      Version 2004 can't come soon enough on this one. There are other nice features on DB Datasources in there as well - we will even be able to see the contents of the data source directly without having to bind it onto the matrix. It is quite amusing to think that this would actually make the workaround quite easy and efficient even if they hadn't stopped the 1 row being returned.