|
I was going to reply in about the same words. I've never had to cast this and I can't see how that would help. You are using VA for Java 1.1? That's pretty old. What version of Java does VA/Java 1.1 use? Connection, ResultSet, Statement, etc. are all interfaces. Try compiling and running outside of VA/Java and see what happens. Make sure that jt400.jar is in your CLASSPATH. Joe Teff -----Original Message----- From: owner-java400-l@midrange.com [mailto:owner-java400-l@midrange.com]On Behalf Of Clapham, Paul Sent: Tuesday, January 30, 2001 3:14 PM To: JAVA400-L@midrange.com Subject: RE: JDBC Problems 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. PC2 -----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 ("jdbc:as400://KITS01"); and do the cast explicitly. You are getting a compiler error correct? Not a run time exception? Nick "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 cc: Subject: Re: JDBC Problems Duncan When I do the try (as in this email) I get the same error: cannot convert from java.sql.Connection to Connection. I use Visual Age for Java 1.1 Maarten +--- | 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 +--- +--- | 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 mailing list archive is Copyright 1997-2024 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.