Funny: a SQLite RowSet view in the debuger

The two line below are represented in the same way in the debuger. But in the former case, there are many thousands Rows, and in the later case, there is only 1 Row.

rowsFound = db.SelectSQL("SELECT * FROM Domiciliation;")
Break
rowsFound = db.SelectSQL("SELECT * FROM Domiciliation WHERE ID=" + Unique_ID.ToString + ";")
Break

That’s normal. Was there a question here?

1 Like

What do you expect? rowsFound can have 0, 1 or thousands of rows.

a rowSet is the currentRow (contents) and extra info (columnCount and if you are at the end etc)
you can move along you rowset (move next) to get the new contents (if any) and update the extra info

it’s not an array. And in any language is not an array
You can convert the rowset to any data structure you need (array of dictionaries, xml, json, two dimension array of variant) but its up to you

1 Like

A difference; the number of Rows for example. Getting the same result is bizare IMHO.

No, with SQLite, there is no extra info. Just a Row Contents.

You can create a Feature Request if you want. Right now the debugger only shows:

Name          Value
rowsFound     RowSet

I get this with one of the SQLite examples that ship with Xojo:
screencast2025-04-0911AM-05-56-ezgif.com-video-to-gif-converter

it is showing ‘ColumnCount’ as Antonio said.

I’m confused. In your initial post you said there was a difference. You got thousands of rows in the first query, and 1 row in the second. That is to be expected.

What do you mean now by “same result”?

Emile wants to see the number of rows the RowSet has in the debugger, similar to what Arrays show. Instead of just RowSet:
image
something like RowSet(1000) or RowSet(0):
image
image

You read the debugger, and see the contents of one Row regardless of the number of Rows the RowSet holds.

Of course, the reason I ask comes from two different lines of codes; I shared them on my initial post.

And the code is simple; what could it be if it was complex ?

You don’t explain what you see on the Debugger and what you expect.
We can only guess.
Is my guess right above?

At last, I understand: the Row number is not displayed.

The four RecordSet Properties are displayed, but not the Row number (current Row)

In fact, I was seeking the current row number and foud four little properties and Contents (the contents of the current Row).

Time to write the question and I forget THAT important part.

That information exists because the current Row contents is displayed.

The “current row” isn’t shown because it’s not a true number at all. If you do a query with a definitive row ID then you get a rowset with just one row. CurrentRow is a pointer to that row. It’s not anything to do with the contents of the record. It isn’t, for example, the ID of the record. Not all database engines have an ID column, some don’t even have a single unique column. The primary key is what identifies the row uniquely. It can often be made up of more than one column.

You can see the data from the current Row by clicking contents, which I think you’ve spotted.

The concept of “current row” is foreign to RowSet. It is whatever row you have moved to. You cannot jump to a specific row in the RowSet, so having that information is pointless.

The debugger doesn’t display RowCount because it is not supported for all databases. You’ll need to set a local variable to RowCount if you want to see it in the debugger.