|
refresh issues with doa
|
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA
Member
|
OP
Member
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA |
I'm converting a very large application from bde to doa. I don't use cached updates. I'm finding that doa components don't seem to work the same as bde when it comes to updating the database. For instance I'm creating a master/detail record in the database using a stored procedure. The procedure is called from a toraclequery. After the procedure is called, I'm issuing a commit at the toraclesession then calling a report program (reportSmith) to print the record. But when I do, the reportsmith doesn't see the record. If the user exits the program and returns, the record is there. Obviously I'm doing something wrong, but what? My customers are fixing to burn me at the stake! Thanks in advance.
|
|
|
Re: refresh issues with doa
|
Joined: Aug 1999
Posts: 22,220
Member
|
Member
Joined: Aug 1999
Posts: 22,220 |
If the changes are not visible, then either:
1. They are not yet committed when you expected. You can easily establish this by querying the affected record in a query tool.
2. The dataset that is used to create the report needs to be refreshed. If it was opened before the changes were made, you will not see them until it is refreshed.
I cannot immediately see any other explanation.
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: refresh issues with doa
|
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA
Member
|
OP
Member
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA |
Ok, after fighting this all weekend I finally figured out something. In this situation I had procedures on one delphi form that called procedures on another delphi form which in turn called procedures on yet another. The third form held my toraclesession and all the toracledatasets and toraclequeries used the toraclesession on the third form. Because they all used the same session I thought that they would all be in the same session but I kept having trouble getting all the procedures to see the database updates. Not only did I issue explicit commits, but I even tried disconnecting and connecting the toraclesession but only when I closed the application and came back, did everything sync up. Finally, I ended up putting all the toracledatasets and toraclequeries on the same form as the toraclesession and it worked. What was I doing wrong? This is about to kill me.
|
|
|
Re: refresh issues with doa
|
Joined: Aug 1999
Posts: 22,220
Member
|
Member
Joined: Aug 1999
Posts: 22,220 |
It seems to me that this can only be an issue with a refresh of a dataset.
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: refresh issues with doa
|
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA
Member
|
OP
Member
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA |
Why would simply moving the toracledataset to another datamodule fix it? That is all I did. I'm puzzled. Are you saying that when I commit a transaction one one dataset or query I should issue a refresh on another, even though they are both connected to the same session?
|
|
|
Re: refresh issues with doa
|
Joined: Aug 1999
Posts: 22,220
Member
|
Member
Joined: Aug 1999
Posts: 22,220 |
If you move a dataset to a different module, then it is created at a different time, and maybe it is also activated at a different time and at a different frequency.
I'm just guessing though...
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: refresh issues with doa
|
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA
Member
|
OP
Member
Joined: Dec 2002
Posts: 18 SHREVEPORT, LA USA |
I know it's puzzling. Oh well, as long as it works. With the BDE the database was committed when you closed the component. With DOA does it work the same or should I issue a commit at the toraclesession level?
|
|
|
Re: refresh issues with doa
|
Joined: Aug 1999
Posts: 22,220
Member
|
Member
Joined: Aug 1999
Posts: 22,220 |
The TOracleDataSet does not implicitly post the currently inserted/edited record if it is closed.
Furthermore, if CachedUpdates is True, all cached updates will be lost.
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
|
|
|