This is more of a general Java question....servlet related.

I've written a class called "Assets" from which "Asset" objects  are
created for each found record in a database.  The Asset object contains a
hash with name/value pairs of the fields in the database and also a bunch
of methods for sifting through these hashes. (or ashes ....ha ha!)

The Asset objects are created in a while loop (see the code below ) and
I'm trying to name the Asset objects dynamically based on the key field
(assetid) in the found ResultSet.   For instance if the ResultSet contains
four found assets and the key fields (assetid) of each are values such as
67,143,69 and 24  I'd like to name the Asset object with these
fields...but the compiler isn't allowing it.  The compiler wants only a
plain ASCII string when naming the object...it gives me an Invalid
Declaration error.  Any suggestions or work arounds?

-----------------------
 while (assetResults.rs.next())  {
        String id = assetResults.rs.getString("assetid");
        String name = assetResults.rs.getString("filename");
        String path = assetResults.rs.getString("filepath");

        Asset assetResults.rs.getString("assetid")= new Asset(id, name, path,
dbase, out);
        //  The line above is what I'd like to do but the compiler gives an
Invalid Declaration.
}
---------------------------

Thanks,

-Nash

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to