One fetch is not getting all of the data and LO does not give clean splice when appending fetch 2 to fetch 1. Is this a bug or are we always supposed to know the required [fetch limit] to get ALL of the data in one fetch?

I have filed a bug report on this behaviour: [Bug 147730] LO Base does not handle compound primary key if one field is empty ("") SQLite3 / ODBC.

Watch this space (may not be directly helpful, but may yield further clues).

Philip K

1 Like

@ZAX
To initiate PM, go to that users profile and toward upper right corner in summary section there is a blue Message button. Click it.

Hello,

This will get all and set to first record:

    Dim oRS_clone As Object
    Dim oForm As Object
    oForm = ThisComponent.Drawpage.Forms.getByName("YOUR_INTERNAL_FORM_NAME")
	oRS_clone  = oForm.createResultSet()
	oRS_clone.Last()

This should be all you need.

Oooops…i gave you credit for the solution…because it seemed it should do the trick. But when i actually tried it…no joy. So for grins i tried it without setting a fetchsize…but that gave 17 duplicates…also, no joy. So maybe…
tmpobj = getObj(“FindQuestionableEntriesDS”,"")
tmpobj.command = mySQLtxt
tmpobj.reload()
tmpobj.fetchsize = tmpobj.rowcount
tmpobj.reload()
’ tmpobj.last 'don’t do this on this query…it really sends the data into the weeds
’ tmpobj.first
WAIT 500
…going to have to make this a standard function for opening anything from now on??? hmmmm…that just seems wrong… I kept in your suggestion of going .last…cuz, like MS Access, LO has this same problem…which is understandable considering the data you are pulling may be coming from half way around the world in many packets with unimaginable retries from a completely different architecture. So, i get it…but can’t help but wonder why the system does not automatically do this .last .first thing for us…

So I would expect this is not the source of you problem. It must be something else in your code. There are no duplicates for me. Same count in table grid, table view and query.
.
What other code are you using? And while you are at it, what OS, DB & LO version?

Depending on your process, you can create a RowSet in a macro and read all records without concern for fetch.

windows 10, HSQLDB, LO 7.1.8.1 x64

yeah…i’m just groping around in the dark…somehow making this app work. It does pretty well most of the time but just barfs all over itself sometimes. Crashes and losses all with no warning. Maybe i have some variable mismatches or call parameter mismatches… i’ve gone back checking through all of that but sometimes they are hard to see. Sometimes it sets my machine into sleep mode. Once it rebooted my machine. A lot of times it just disappears…it sometimes even disappears but keeps running an orphan process. sometimes when it crashes and seems to go away…i look in the task manager and find 7 or 8 instances of libre office running… Access did stuff like this too.

Using the rowcount to set the fetchsize and then reloading seems to be a decent work around considering there may not be a real solution.

I do not subscribe to that.

If this is not expected then there is something seriously incorrect with the processing.
.
Can’t help any further without code.