🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17549

Vector addElement method question

#17549
From: Lisa Elliott
Date: Fri, 30 Oct 1998 00:00
15 lines
1264 bytes
After performing a query, I am placing the contents of the result row in
a class that I have defined.  I then use addElement to add that class to
a vector.   I am performing this logic (both placing the result row in a
class and then adding that class to a vector)  in a loop to process the
entire query result set.    When I view the contents of the vector in
debug mode, it appears as though each addElement execution updates all
currently populated vector objects with the most current result set
row.  So, when the loop is complete, for example,  vector size is 10 and
all 10 objects are the last row from the result set.
Is there something that I am missing ?    Can a vector be populated in
this manner from a result set ?

Thanks for any help.

Lisa
Technical Details
Message-ID: <3639BB48.F4C8CBC7@jhmi.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,35c3abf5ac4f8dcd,start
X-Google-Attributes: gidf74b3,public
From: Lisa Elliott <lelliot@jhmi.edu>
Subject: Vector addElement method question
Date: 1998/10/30
Message-ID: <3639BB48.F4C8CBC7@jhmi.edu>
X-Deja-AN: 406659180
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language