 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mehmet F. Erten Guest
|
Posted: Tue Aug 08, 2006 11:38 pm Post subject: Still keeps the rows after close/open or refresh with InterB |
|
|
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. |
|
| Back to top |
|
 |
John Moore (TeamB) Guest
|
Posted: Wed Aug 09, 2006 11:05 pm Post subject: Re: Still keeps the rows after close/open or refresh with In |
|
|
Mehmet F. Erten wrote:
| Quote: | 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..
| Quote: | 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
==================================================== |
|
| Back to top |
|
 |
Mehmet F. Erten Guest
|
Posted: Thu Aug 10, 2006 12:45 am Post subject: Fun never ends, nature of the beast |
|
|
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 |
|
| Back to top |
|
 |
Mehmet F. Erten Guest
|
Posted: Thu Aug 10, 2006 12:48 am Post subject: Re: Fun never ends, nature of the beast |
|
|
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 |
|
| Back to top |
|
 |
John Moore (TeamB) Guest
|
Posted: Thu Aug 10, 2006 11:42 pm Post subject: Re: Fun never ends, nature of the beast |
|
|
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:
| Quote: | 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
==================================================== |
|
| Back to top |
|
 |
Mehmet F. Erten Guest
|
Posted: Fri Aug 11, 2006 2:20 am Post subject: Re: Fun never ends, nature of the beast |
|
|
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. |
|
| Back to top |
|
 |
John Moore (TeamB) Guest
|
Posted: Fri Aug 11, 2006 11:29 pm Post subject: Re: Fun never ends, nature of the beast |
|
|
Mehmet F. Erten wrote:
| Quote: | 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
| Quote: | 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.
| Quote: | 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
==================================================== |
|
| Back to top |
|
 |
Mehmet F. Erten Guest
|
Posted: Sat Aug 12, 2006 2:49 am Post subject: Re: Fun never ends, nature of the beast |
|
|
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 (AT) microps (DOT) com> wrote in message
news:44dccc95$1 (AT) newsgroups (DOT) borland.com...
| Quote: | 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
==================================================== |
|
|
| Back to top |
|
 |
John Moore (TeamB) Guest
|
Posted: Sat Aug 12, 2006 11:11 pm Post subject: Re: Fun never ends, nature of the beast |
|
|
Mehmet F. Erten wrote:
| Quote: | John,
Don't forget this table usage.
|
I understand..
| Quote: | 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>)
| Quote: | It is always empty in the database.
|
Why is that table even there..<G>
| Quote: | 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..
| Quote: | 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..
| Quote: | 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..
| Quote: | Thanks for your help.
"John Moore (TeamB)" <jbm (AT) microps (DOT) com> wrote in message
news:44dccc95$1 (AT) newsgroups (DOT) 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
==================================================== |
|
| Back to top |
|
 |
Max-Ph. Blickenstorfer Guest
|
Posted: Sun Aug 13, 2006 6:46 pm Post subject: Re: Fun never ends, nature of the beast |
|
|
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 (AT) mblsoft (DOT) com> wrote in message
news:44dcfb51$1 (AT) newsgroups (DOT) borland.com...
| Quote: | 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 (AT) microps (DOT) com> wrote in message
news:44dccc95$1 (AT) newsgroups (DOT) 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
====================================================
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|