• Subject: RE: JDBC Problems
  • From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx>
  • Date: Tue, 30 Jan 2001 13:14:29 -0800

I'm not so sure about that.  The compiler message says you can't convert
from java.sql.Connection to Connection, so I don't think an explicit cast
will help.  Anyway, I never have to do that in my SQL programs.

The question is:  If the compiler thinks Connection is not
java.sql.Connection, then what is it?  Sounds like there's another unrelated
Connection class kicking around in the classpath.


-----Original Message-----
From: Nick.Vrtis@alticor.com [mailto:Nick.Vrtis@alticor.com]
Sent: January 30, 2001 11:44
To: JAVA400-L@midrange.com
Subject: Re: JDBC Problems

Duh!... as he hits himself for not reading...Try

 conn = (Connection) java.sql.DriverManager.getConnection

and do the cast explicitly.  You are getting a compiler error correct?  Not
a run time exception?


"Maarten Vries, de" <m_devries74@hotmail.com>@midrange.com on 01/30/2001
01:30:48 PM

Please respond to JAVA400-L@midrange.com

Sent by:  owner-java400-l@midrange.com

To:   JAVA400-L@midrange.com

Subject:  Re: JDBC Problems


When I do the try (as in this email)
I get the same error: cannot convert from java.sql.Connection to
I use Visual Age for Java 1.1

| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.