RE: RE: Error in servlet - Mailing list pgsql-general

From Andreas Tille
Subject RE: RE: Error in servlet
Date
Msg-id Pine.LNX.4.21.0009151331500.6463-100000@wr-linux02.rki.de
Whole thread Raw
In response to RE: RE: Error in servlet  ("chris markiewicz" <cmarkiew@commnav.com>)
Responses what is the equivalent of oracle's DESCRIBE table?  ("chris markiewicz" <cmarkiew@commnav.com>)
List pgsql-general
On Fri, 15 Sep 2000, chris markiewicz wrote:

> oh yeah, and you need to call rs.next()...
;-)))

> there are two obvious solutions to this problem...
>
> 1 (i DON'T recommend this one) declare the variables in a method and pass
> them to other methods as necessary.
>
> 2 (i do recommend this one) many server side java programmers feel that
> servlets should be a gateway and nothing else...essentially a servlet should
> do little more than call your other classes.  i.e. put all of your db
> processing in a separate class and call it from your servlet.
In this case I'm perfectly all right.  My servlet has just about 20 lines
and does call a class.  This class instanciates a "Database-Accessing"-
Class (WebSQL) because I started with access to MS SQL server and now porting
to PostgreSQL.  I just have to change WebSQL to use another database
engine.  All the connections, statements etc are private in this
class.  But I wanted to avoid to declare this stuff in every method
of this class.

Kind regards

        Andreas.


pgsql-general by date:

Previous
From: "chris markiewicz"
Date:
Subject: RE: RE: Error in servlet
Next
From: "chris markiewicz"
Date:
Subject: what is the equivalent of oracle's DESCRIBE table?