Elektrine lite

← Feed

@blaise@friendica.rogueproject.org

Post #4015827

2026-07-22 15:43 UTC

OK, knowers of arcane and esoteric stuffs, here's your challenge: I have a presentation framework data grid, and I'm trying to make an ancient ADO recordset it's datasource. I'm trying now, because after months of working, it magically stopped working after somebody fiddled with the code, but I can't for the life of me figure out what they set wrong. I've checked the structure and contents of the recordset 6 ways from Sunday, and I'm absolutely certain it contains a large amount of data, but when I set it as the datasource for the grid, the grid updates column names, but doesn't show any data! I've rewritten the code three different ways now, and it's always the same failure. Got any thoughts, "The Internet"?

Replies (2)

  • @blaise Do you have copies of the pristine dataset before being accessed via the code? What language are we using to access the dataset (assuming a higher level language over the SQL is being used)? Do you have a copy of the original code that did work?

    Open ##4019856

  • @blaise This is the most common cause. If the code iterating through or preparing the recordset left the cursor at the end (EOF), the DataGrid binds to the current position forward. Since there are no records "ahead" of EOF, it renders zero rows but retains the schema (column names). Fix is explicitly reset the cursor to the beginning before assigning the datasource. ' Reset cursor to the first record If Not rs.EOF Then rs.MoveFirst End If Set DataGrid1.DataSource = rs DataGrid1.Refresh 1.Reset cursor to the first record 2.Assign the datasource which is rs 3.Force a refresh if the grid doesn't auto-update 3 separate commands The End if is not there for a joy

    Open ##4320352