Lazarus
Programming => Databases => Topic started by: Nicole on February 27, 2023, 04:30:54 pm
-
There is a list of tables and a list of navbars.
Most work fine by Datarsource, Dataset, IBQuery,... the usual way.
There is one - and I feel so stupid to ask this question - which does not work.
So you will say: How on earth shall we guess, what is wrong?
Therefore I ask: How to debug?
I compared all data-sensitive elements if they would point somewhere else.
All looks fine.
How can I watch what the green commit-icon (?) does?
If I am lucky, here is somebody that old in programming, that he made all mistakes already.
May be he can guess, what is wrong in my case.
-
The green icon is not "commit" it ist "post".
-
The green icon is not "commit" it ist "post".
There are two green icons.....
-
Thank you for the answers.
Its the green icon with the red error pointing on it.
About "post": What to change, that it is written into my database?
I a different table this very icon works find and does the saving.
So I suppose, there is a setting, but I am not experience enough with IBX to know which one.
The settings and properties overwhelm me.
-
Maybe there is an option "AutoCommit" or something.
IIRC, there is such a thing for the "regular" DB-Objects (Connection, Transaction, Query)
-
There was something like autocommit - but setting it to acCommitRetaining instead of "disabled", did not help.
-
CommitRetaining is not AutoCommit.
CommitRetaining keeps the Transaction-Context "alive"
But i think i found it:
https://www.freepascal.org/docs-html/fcl/sqldb/tsqltransactionoptions.html
Look if your IB-Transaction has an option like "stoUseImplicit" or alike
EDIT: Here it is, though for TSQLQuery.
https://www.freepascal.org/docs-html/fcl/sqldb/tsqlqueryoptions.html
Look for something like this in you IBXQuery (or whatever it's called).
Found something else:
https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref40/fblangref40-transacs.html
Look at point 12.1.1.2.6 AUTO COMMIT (about half way down)
Maybe you can set it as Param-Option during connection
-
Not sure, if this is that complex.
I have several dialog surfaces of that kind. All with IBQuery, datasource, dataset.
The others work fine and without touching the query or transaction options.
My database and transaction are in an own datamodul. I never touch them.
-
Then maybe if you finally show us some code then people don’t have to guess what you are doing.
-
If I would know, what exactly is responsible for it, - I would correct it.
It is quite sure a property of IBQuery, dataset or datasource.
Probably only one could solve it, who knows ab lot about IBQueries.
-
Even someone who knows a lot about IBqueries cannot help you if you only give us vague hits and show us nothing.
If you think the queries are the problem then show them!
-
Not sure, if this is that complex.
I have several dialog surfaces of that kind. All with IBQuery, datasource, dataset.
The others work fine and without touching the query or transaction options.
My database and transaction are in an own datamodul. I never touch them.
There is only a slim chance that someone encountered the same problem and remembers what was it, without seeing actual set up you have.
If you have similar situation in other parts of your program and they work fine, then my advice is that you compare them, component by component:
- check queries if they are similar in nature (i.e. both are queries without join, use parameters and similar)
- check what properties you change programmatically in both cases
- compare properties of components one by one in object inspector, check methods assigned to events
- view forms as text and compare components (this is similar to the line above, but sometimes one may spot difference easier then in object inspector)
If you can't find differences then it's getting more complicated. See what event should be fired when pressing that button and see if it is working. Maybe component are set up fine, but something with database is not set-up.
-
@dslingo,
this is exactly what I will do, when there is no solution.
Some weeks ago, I had a problem with Navbar. No, it was not Tony, it was the other genius about IBX said, "oh, you have to copy a senseless content to the SQL fields even if you overwrite it."
Hu? - What shall I say. It just worked after it. I never would have thought about such a thing. And absolutely nothing had changed in the items by themselves.
Such a "magic idea" I hope to get.
If not or if there is none.... see above. Then I start it from beginning and hope, it would have other results. Einstein thinks, this is insane, sobb. But what shall I do.
Believe me: I have compared all the linked things already and could not find the clou.
-
have it:
DataSource has pointed at IBQuery instead of IBDataset