i ve hospitaldb created in MYSQl, i have connectivity problem like

String connectionURL = "jdbc:mysql://eall:3306/hospitaldb";

    // declare a connection by using Connection interface 
    Connection connection = null;

    // declare object of Statement interface that uses for executing sql statements.
     PreparedStatement pstatement = null;

	// Load JBBC driver "com.mysql.jdbc.Driver"

and here

connection = DriverManager.getConnection(connectionURL, "eall", "e123");

i knoe to do this in MS access.i need database file in webapps in which i va created in MYSQl

8 Years
Discussion Span
Last Post by palavi

hi, thanks for replying, u mean i shud ve jdbc driver, i ve assigned with a project called hospital management, the system i ve got has MySQL driver ,SQL server, which i saw in control panel->administrative tools->user DSN. not in system DSN here i shud select my database created file dat is hospitaldb is my DB name, i want to select it here to get connection where i will add my hospitaldb file here, which must be present in my webapps dir, but i am not getting that hospitaldb file in webapps, i ve created DB hopspitaldb in MYSQL command prompt and i can see it in MYSQL browser, i am not getting its physical location wat to do?i am new to Mysql and i know connectivity for MS access driver 2003(.mdb), thought same for mysql,but not getting, ppl here insist me to do it in Mysql dats k
but in this system in lib dir there is no jar file for JDBC i think we shud have it , inorder to work, is it dat problem plz tel me??


k its Class.forName("com.mysql.jdbc.Driver"); and not
Class.forName("com.mysql.jdbc.hospitaldb").newInstance();. yes i will dat but i dont have .jar file in lib directory i must ve it right?? i saw it while searching?? and few here ve used SQL server........


It might be, could be in /usr/share or /usr/share/bin, is it giving a classnotfound when you try to use it this way?


yes i am getting classnotfound exception ,i was doing all wrong stuff , a friend of mine said no need to do settings in control panel->adminstraive tools etc...now i think i can find out da error... i will try.. thank u very much for replying..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.