The code needs to be inside of a method...you have no method defined.
>>> [EMAIL PROTECTED] 7/31/00 6:02 >>>
Hi all,
Can somebody please help me with this problem.
When I compile this source-code, for making a connection to a database,
I'll receive the error "type expected" in the first TRY-statement.
How can I solve this and what does it mean?
Thanks,
Marcel van Kooy
import java.sql.*;
public class TestBean {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch( Exception e ) {
System.out.println("Failed to load JdbcOdbcDriver.");
return;
}
try {
Connection con =
DriverManager.getConnection("jdbc:odbc:Studio_Bezoekers", "", "");
Statement select = con.createStatement();
ResultSet result = select.executeQuery
("...A query...");
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets