When compiling I get the error Missing type on declaration Class.forName(String); ^ Why do I get this. Can anyone help?
Nizan Horsefield<BR>Sys Eng Internet Services<BR>Citibank
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
What are you passing to the method? We need to see some code in order to be able to help. The method call locates and loads the DB driver, and it expects a string. Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Nizan Horsefield
Ranch Hand
Joined: Jun 05, 2001
Posts: 42
posted
0
String url = "jdbc dbc://localhost/servers"; //can't get rid of the smiley! Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection(url); I have tried substituting with a String and leaving it blank. Both give the same error. Cheers
[This message has been edited by Nizan Horsefield (edited July 11, 2001).] [This message has been edited by Nizan Horsefield (edited July 11, 2001).]
rani bedi
Ranch Hand
Joined: Feb 06, 2001
Posts: 358
posted
0
can't figure out why are you getting such error. Can you please show the whole code and the rroe message you are receiving.
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Nizan Horsefield
Ranch Hand
Joined: Jun 05, 2001
Posts: 42
posted
0
Neither could I! However I have got it working now! IT was all to do with a } being in the wrong place! Threw off at tangents chasing this error. Thanks for trying anyway, Nizan.