🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.database
Article #235

Re: Fun never ends, nature of the beast

#235
From: John Moore (TeamB)
Date: Thu, 10 Aug 2006 18:42
44 lines
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
====================================================
Technical Details
Message-ID: <44db7e32@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <44d8da2b$1@newsgroups.borland.com> <44da23d6$1@newsgroups.borland.com> <44da3b7a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1073da,1edbdc0ef701870a
X-Google-Attributes: gid1073da,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 10 Aug 2006 11:42:58 -0700
From: "John Moore (TeamB)" <jbm@microps.com>
User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.database
Subject: Re: Fun never ends, nature of the beast
References: <44d8da2b$1@newsgroups.borland.com> <44da23d6$1@newsgroups.borland.com> <44da3b7a@newsgroups.borland.com>
In-Reply-To: <44da3b7a@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 207.137.13.178
Message-ID: <44db7e32@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1155235378 207.137.13.178 (10 Aug 2006 11:42:58 -0700)
Lines: 44
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail