Recent

Author Topic: How to debug? - Navbar - "commit" does not do its job  (Read 1407 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
How to debug? - Navbar - "commit" does not do its job
« 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.



datiscum

  • Newbie
  • Posts: 6
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #1 on: February 28, 2023, 03:12:47 pm »
The green icon is not "commit" it ist "post".

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #2 on: March 01, 2023, 10:40:18 am »
The green icon is not "commit" it ist "post".
There are two green icons.....
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #3 on: March 01, 2023, 12:05:20 pm »
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.

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #4 on: March 01, 2023, 12:12:17 pm »
Maybe there is an option "AutoCommit" or something.

IIRC, there is such a thing for the "regular" DB-Objects (Connection, Transaction, Query)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #5 on: March 01, 2023, 02:55:34 pm »
There was something like autocommit - but setting it to acCommitRetaining instead of "disabled", did not help.

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #6 on: March 01, 2023, 03:53:17 pm »
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
« Last Edit: March 01, 2023, 04:02:24 pm by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #7 on: March 01, 2023, 05:10:03 pm »
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.

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #8 on: March 01, 2023, 09:45:58 pm »
Then maybe if you finally show us some code then people don’t have to guess what you are doing.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #9 on: March 02, 2023, 12:52:28 pm »
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.


JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #10 on: March 02, 2023, 01:51:54 pm »
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!
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

dseligo

  • Hero Member
  • *****
  • Posts: 1221
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #11 on: March 02, 2023, 02:44:26 pm »
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.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: How to debug? - Navbar - "commit" does not do its job
« Reply #12 on: March 02, 2023, 03:54:03 pm »
@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.

Nicole

  • Hero Member
  • *****
  • Posts: 970
[solved] Re: How to debug? - Navbar - "commit" does not do its job
« Reply #13 on: March 04, 2023, 11:14:55 am »
have it:
DataSource has pointed at IBQuery instead of IBDataset

 

TinyPortal © 2005-2018