Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC x getConnection

843854Mar 19 2005 — edited Aug 15 2005
I�m using eclipse and when I was using the jdbc.odbc.jdbcodbcDriver a message error said that the driver was not found.
Now I have downloaded the sql driver....and I did:
public void stabilishConection()
	{
		try
		{
			
			Class.forName("com.mysql.jdbc.Driver");
			Connection con = DriverManager.getConnection("jdbc:myBase", "", "");

		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
	}
The message that appears is: no suitable driver at java.sql.DriverManager.getConnection(Unknown Source)
I have set the classpath correctly....
I�m a begginer and I�m just trying to create my first program..but I�m trying this for a long time and it�s not working...
Do I have to create a dataBase file before running the program??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2005
Added on Mar 19 2005
19 comments
121 views