Win7, D11.2, FMX app, using TStringGrid and FireDAC and SQLite
In a near-perfect working database, it should never happen, but it could happen elsewhere, and since I have the issue now, I would like to know how to resolve this.
I was doing some what-if scenarios and came upon this issue. I searched around here and elsewhere on the internet but I can not find the answer.
In this scenario, I was adding a new record, which has an auto-increment field in this test database, IDNo -- ('IDNo INTEGER NOT NULL PRIMARY KEY,'). And it generated an error. Of course I understand why this happened, and can later figure out a method to avoid it from happening. But for now, i need to know how to resolve the "closed dataset" issue because I can't see the data any longer.
I've tried closing the Query, and reopening it. And tried closing the Connection and reopening it too. But they are not working.
When a database or dataset closes, how do I re-open it through code so that I can see the data again in the StringGrid?