NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
lewisposner
Joined: 07 Sep 2011 Posts: 1
|
Posted: Wed Sep 07, 2011 11:59 am Post subject: Adding the mySQL Library |
|
|
Hi all,
I hate to ask what seem like an obvious question but Im having some trouble installing the mySQL library into a project.
I have downlaoded the connector from mySQL. I right click on my project name and then selected properties. I have then selected libraries and Add/ JAR/FOLDER add added the relevant mySQL jar connector. The library loads fine and I can see it under the libraries tab of the project. However when I then try to use a method or protocol from that library it dosnt exisit.
For example
try{
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306"
+ "/test", "username","password");
Statement stmt =(Statement) con.createStatement();
String name ="lewis";
String lastName = "posner";
String test ="INSERT INTO new_table VALUES('Lewis')";
}catch(Exception e){
}
I now want to upload this by using sending stmt.executeUpdate(test);
However the method executeUpdate dosnt exist.
I hope that make sense? can anyone help me please would really appreciate it.
Thanks
Lewis |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|