Thread View: borland.public.jbuilder.database
10 messages
10 total messages
Started by Mehmet F. Erten
Tue, 08 Aug 2006 18:38
Still keeps the rows after close/open or refresh with InterBase
Author: Mehmet F. Erten
Date: Tue, 08 Aug 2006 18:38
Date: Tue, 08 Aug 2006 18:38
7 lines
1230 bytes
1230 bytes
I use a work file: a table defined to open/insert but never save. I migrated from JDataStore into InterBase now refresh or close/open does not get rid off the current rows from the table. If anyone knows why? Thanks. For now I will check the rowCount after the refresh or open to delete.
Re: Still keeps the rows after close/open or refresh with InterBase
Author: John Moore (TeamB)
Date: Wed, 09 Aug 2006 18:05
Date: Wed, 09 Aug 2006 18:05
30 lines
1905 bytes
1905 bytes
Mehmet F. Erten wrote: > I use a work file: a table defined to open/insert but never save. > I migrated from JDataStore into InterBase now refresh or close/open does not > get rid off the current rows from the table. > If anyone knows why? To the best of my knowledge it never did... (and I sure hope it never does or it will break a LOT of my code..<G>) Before you close the dataset issue dataset.cancel(); This should remove all "non-saved" records from that dataset.. > Thanks. > > For now I will check the rowCount after the refresh or open to delete. > > > -- ============================================= TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! Post all questions and replies to this newsgroup ONLY For papers on DataExpress, Applets, JSP, and Web Development go to: http://www.microps.com/mps/paperFAQ.html ====================================================
Fun never ends, nature of the beast
Author: Mehmet F. Erten
Date: Wed, 09 Aug 2006 19:45
Date: Wed, 09 Aug 2006 19:45
19 lines
1707 bytes
1707 bytes
In the same program I use the same table as a work table more than once
(a few times) only this one fails for a reason.
Even after the cancel() and close() it keeps the rows in it.
No clue.
So I rely on the old fashioned way: deleteAllRows() if getRowCount()
first cycle false, true, 0
but the second cycle should be true, false, 0 but it is as follows:
System.out.println(dataSet.isOpen()); ===> true
if (dataSet.isOpen())
{
dataSet.cancel();
dataSet.close();
}
System.out.println(dataSet.isOpen()); ====> false
dataSet.open();
System.out.println(dataSet.getRowCount()); ====> 2
Re: Fun never ends, nature of the beast
Author: Mehmet F. Erten
Date: Wed, 09 Aug 2006 19:48
Date: Wed, 09 Aug 2006 19:48
23 lines
1461 bytes
1461 bytes
previuos results should be false, false, 0
true, false, 2 (which should be 0
after a close/open)
JBuilderX\jdk1.4\jre\lib\plugin.jar;C:\JBuilderX\jdk1.4\jre\lib\rt.jar;.......
-Xms256M -Xmx256M mbl.Application1
false
false
0
onePurchaseOrderEstimateDataSet: 0
TrueType font directory does not exist: c:/winnt/fonts
true
false
2
onePurchaseOrderEstimateDataSet: 2
Re: Fun never ends, nature of the beast
Author: John Moore (TeamB)
Date: Thu, 10 Aug 2006 18:42
Date: Thu, 10 Aug 2006 18:42
44 lines
2590 bytes
2590 bytes
It is kind of hard to tell specifically what you are doing and you may
be leaving out critical information.. But..
dataset.cancel() only cancels edits to a new or existing record. (see
documentation) So if you are putting in multiple rows the cancel will
only work on the LAST row entered.
If you have multiple rows, you would then need to deleteAllRows();
Are you using a TableDataSet or a QueryDataSet for this..???
Mehmet F. Erten wrote:
> In the same program I use the same table as a work table more than once
> (a few times) only this one fails for a reason.
>
> Even after the cancel() and close() it keeps the rows in it.
> No clue.
> So I rely on the old fashioned way: deleteAllRows() if getRowCount()
>
> first cycle false, true, 0
> but the second cycle should be true, false, 0 but it is as follows:
>
> System.out.println(dataSet.isOpen()); ===> true
> if (dataSet.isOpen())
> {
> dataSet.cancel();
> dataSet.close();
> }
> System.out.println(dataSet.isOpen()); ====> false
> dataSet.open();
> System.out.println(dataSet.getRowCount()); ====> 2
>
>
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
http://www.microps.com/mps/paperFAQ.html
====================================================
Re: Fun never ends, nature of the beast
Author: Mehmet F. Erten
Date: Thu, 10 Aug 2006 21:20
Date: Thu, 10 Aug 2006 21:20
12 lines
1638 bytes
1638 bytes
Hi, I use QueryDataSet. This was working OK with JDataStore. And it works with InterBase in many other codes I have. In this occation closing and opening again does not get rid of the rows. But I also do not get any Exception (if any reason these rows or this table are locked. So I check row count and delete them all if there is any. I am reading the table columns without any condition and since there is no data, it should be empty all the time when I open or refresh it. In this case, it is not, does not matter if refreshed or closed/opened the previous rows stays.
Re: Fun never ends, nature of the beast
Author: John Moore (TeamB)
Date: Fri, 11 Aug 2006 18:29
Date: Fri, 11 Aug 2006 18:29
38 lines
2365 bytes
2365 bytes
Mehmet F. Erten wrote: > Hi, > I use QueryDataSet. > This was working OK with JDataStore. > And it works with InterBase in many other codes I have. > In this occation closing and opening again does not get rid of the rows. It never should drop rows due to closing or opening.. But > I also do not get any Exception (if any reason these rows or this table are > locked. That is not applicable to the QueryDataSet.. The QDS is an in memory table and is not connected to the database.. (Provide/Resolve model) so locking does not apply. > So I check row count and delete them all if there is any. > I am reading the table columns without any condition and since there is no > data, it should be empty all the time when I open or refresh it. > In this case, it is not, does not matter if refreshed or closed/opened the > previous rows stays. It should stay.. (based on what you have said..) > > > > -- ============================================= TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! Post all questions and replies to this newsgroup ONLY For papers on DataExpress, Applets, JSP, and Web Development go to: http://www.microps.com/mps/paperFAQ.html ====================================================
Re: Fun never ends, nature of the beast
Author: Mehmet F. Erten
Date: Fri, 11 Aug 2006 21:49
Date: Fri, 11 Aug 2006 21:49
55 lines
3246 bytes
3246 bytes
John, Don't forget this table usage. It is a work table, never saved. It is always empty in the database. if I close and open it (no where clause) it will bring nothing since there is no record in it. Later if I insert some rows, they will be in it until it is refreshed or closed. After whenever I open it, it should be again an empty table. At this time I will stick to the workaround since it is an isoloated incident (one program) and I won't spend any time to fix it (still I have to discover a lot about InterBase as scheduled batch Backup: I will post this in interbase.general) Thanks for your help. "John Moore (TeamB)" <jbm@microps.com> wrote in message news:44dccc95$1@newsgroups.borland.com... > Mehmet F. Erten wrote: >> Hi, >> I use QueryDataSet. >> This was working OK with JDataStore. >> And it works with InterBase in many other codes I have. >> In this occation closing and opening again does not get rid of the rows. > > It never should drop rows due to closing or opening.. > > But >> I also do not get any Exception (if any reason these rows or this table >> are locked. > > That is not applicable to the QueryDataSet.. The QDS is an in memory > table and is not connected to the database.. (Provide/Resolve model) so > locking does not apply. > >> So I check row count and delete them all if there is any. >> I am reading the table columns without any condition and since there is >> no data, it should be empty all the time when I open or refresh it. >> In this case, it is not, does not matter if refreshed or closed/opened >> the previous rows stays. > > It should stay.. (based on what you have said..) > >> >> >> >> > > > -- > ============================================= > TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! > Post all questions and replies to this newsgroup ONLY > For papers on DataExpress, Applets, JSP, and Web Development go to: > http://www.microps.com/mps/paperFAQ.html > ====================================================
Re: Fun never ends, nature of the beast
Author: John Moore (TeamB)
Date: Sat, 12 Aug 2006 18:11
Date: Sat, 12 Aug 2006 18:11
94 lines
4368 bytes
4368 bytes
Mehmet F. Erten wrote: > John, > Don't forget this table usage. I understand.. > It is a work table, never saved. That is why I asked if it was a QueryDataSet or a TableDataSet.. In your case you should be using a TableDataSet, you are miss using the tools.. (Using a hammer to put on masking tape...<G>) > It is always empty in the database. Why is that table even there..<G> > if I close and open it (no where clause) it will bring nothing since there > is no record in it. Hence the TableDataSet should be used.. For the QueryDataSet you should set to false the "execute on open" (executeOnOpen) flag of the QueryDescriptor(...) On the other hand this is what probably makes you think that opening the QDS is emptying it.. It is in the sense that you are doing a re-query, but that is a very bad waste of bandwidth to the data server.. > Later if I insert some rows, they will be in it until it is refreshed or > closed. > After whenever I open it, it should be again an empty table. Only if the executeOnOpen flag is set to true.. > At this time I will stick to the workaround since it is an isoloated > incident (one program) and I won't spend any time to fix it (still I have to > discover a lot about InterBase as scheduled batch Backup: I will post this > in interbase.general) As I said before I still think you should be using the TableDataSet for this task.. > Thanks for your help. > > "John Moore (TeamB)" <jbm@microps.com> wrote in message > news:44dccc95$1@newsgroups.borland.com... >> Mehmet F. Erten wrote: >>> Hi, >>> I use QueryDataSet. >>> This was working OK with JDataStore. >>> And it works with InterBase in many other codes I have. >>> In this occation closing and opening again does not get rid of the rows. >> It never should drop rows due to closing or opening.. >> >> But >>> I also do not get any Exception (if any reason these rows or this table >>> are locked. >> That is not applicable to the QueryDataSet.. The QDS is an in memory >> table and is not connected to the database.. (Provide/Resolve model) so >> locking does not apply. >> >>> So I check row count and delete them all if there is any. >>> I am reading the table columns without any condition and since there is >>> no data, it should be empty all the time when I open or refresh it. >>> In this case, it is not, does not matter if refreshed or closed/opened >>> the previous rows stays. >> It should stay.. (based on what you have said..) >> >>> >>> >>> >> >> -- >> ============================================= >> TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! >> Post all questions and replies to this newsgroup ONLY >> For papers on DataExpress, Applets, JSP, and Web Development go to: >> http://www.microps.com/mps/paperFAQ.html >> ==================================================== > > -- ============================================= TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! Post all questions and replies to this newsgroup ONLY For papers on DataExpress, Applets, JSP, and Web Development go to: http://www.microps.com/mps/paperFAQ.html ====================================================
Re: Fun never ends, nature of the beast
Author: Max-Ph. Blickenstorfer
Date: Sun, 13 Aug 2006 13:46
Date: Sun, 13 Aug 2006 13:46
78 lines
4001 bytes
4001 bytes
Hi Mehmet, As I read the thread it seems you dont't want to persist any changes to the underlying db-table. Therefore, as John mentioned, you should use an plain in-memory table to do the job. To me it looks not like a db problem, it's a problem of data persistence, so strictly cache all changes on the client and discard everything when done. So you possibly only need underlying metadata from your db to create an in-memory worktable. In case you work in a kind of briefcase model you automatically encounter the expected behaving, as soon as you leave this model it seems to behave unexpected since all changes are comited automatically by default. Regards Max "Mehmet F. Erten" <mehmet_erten@mblsoft.com> wrote in message news:44dcfb51$1@newsgroups.borland.com... > John, > Don't forget this table usage. > It is a work table, never saved. > It is always empty in the database. > if I close and open it (no where clause) it will bring nothing since there > is no record in it. > Later if I insert some rows, they will be in it until it is refreshed or > closed. > After whenever I open it, it should be again an empty table. > At this time I will stick to the workaround since it is an isoloated > incident (one program) and I won't spend any time to fix it (still I have to > discover a lot about InterBase as scheduled batch Backup: I will post this > in interbase.general) > Thanks for your help. > > "John Moore (TeamB)" <jbm@microps.com> wrote in message > news:44dccc95$1@newsgroups.borland.com... > > Mehmet F. Erten wrote: > >> Hi, > >> I use QueryDataSet. > >> This was working OK with JDataStore. > >> And it works with InterBase in many other codes I have. > >> In this occation closing and opening again does not get rid of the rows. > > > > It never should drop rows due to closing or opening.. > > > > But > >> I also do not get any Exception (if any reason these rows or this table > >> are locked. > > > > That is not applicable to the QueryDataSet.. The QDS is an in memory > > table and is not connected to the database.. (Provide/Resolve model) so > > locking does not apply. > > > >> So I check row count and delete them all if there is any. > >> I am reading the table columns without any condition and since there is > >> no data, it should be empty all the time when I open or refresh it. > >> In this case, it is not, does not matter if refreshed or closed/opened > >> the previous rows stays. > > > > It should stay.. (based on what you have said..) > > > >> > >> > >> > >> > > > > > > -- > > ============================================= > > TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL! > > Post all questions and replies to this newsgroup ONLY > > For papers on DataExpress, Applets, JSP, and Web Development go to: > > http://www.microps.com/mps/paperFAQ.html > > ==================================================== > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads