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" <email@example.com>@midrange.com on 01/30/2001 01:30:48 PM Please respond to JAVA400-L@midrange.com Sent by: firstname.lastname@example.org 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: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.