Print Thread
refresh issues with doa
#5115 07/15/03 09:40 AM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
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
#5116 07/15/03 09:30 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
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
#5117 07/21/03 01:27 AM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
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
#5118 07/21/03 08:23 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
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
#5119 07/21/03 09:27 PM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
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
#5120 07/22/03 08:58 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
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
#5121 07/22/03 09:02 PM
Joined: Dec 2002
Posts: 18
SHREVEPORT, LA USA
R
Member
OP Offline
Member
R
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
#5122 07/23/03 08:04 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
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

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.029s Queries: 13 (0.009s) Memory: 2.5324 MB (Peak: 3.0431 MB) Data Comp: Off Server Time: 2024-05-18 15:26:54 UTC
Valid HTML 5 and Valid CSS