tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Lee Deliang" <just_dar...@hotmail.com>
Subject RE: Help me !
Date Wed, 12 Jul 2000 11:17:02 GMT

I did declare the con as :

private Connection con = null;

but it posed no problems in my other jsp pages..

Another qn, is it possible to establish only one Connection object to my db 
(con) and use it for different methods in my class? for example method A 
wants to access and read some data from Table A in my db while method B will 
access and WRITE to Table B in my db. Can I use the same con or do I need to 
declare several?

Darren

>From: Bob Byron <bbyron@MailAndNews.com>
>Reply-To: tomcat-user@jakarta.apache.org
>To: "Darren Lee Deliang" <just_darren@hotmail.com>,    tomcat-user 
><tomcat-user@jakarta.apache.org>
>Subject: RE: Help me !
>Date: Tue, 11 Jul 2000 12:03:28 -0400
>
>I would suspect your variable "con" is null.  If you want a quick check, I
>would insert System.out.println("Connection=" + con); before line 253.
>
>If it displays "Connection=null", you will want to reexamine the
>initialization of con.
>
>------------------------------------------------------------
>Bob Byron
>RAD Systems, Inc.
>(972)516-4256
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message