Wednesday
Posted by sean.smorris on 2009-09-21 21:30
Alright folks just a recap --
1) HW #7 will be due end of the week. I want comprehensive notes on connecting to, selecting, inserting, deleting, updating records from JAVA. By Wednesday, you should clean up your notes on Connecting to the DB.
2) Try setting up a connection class from JAVA to see if you can get it to work -- if you can't don't stress we'll figure it out. I have attached my sample from class.
Email me with questions -- we'll tear it up this week.
mm
=====
Sample Connection class:
import java.sql.Connection;
import java.sql.DriverManager;
public class DBSample {
private Connection conn;
public DBSample()
{
this.establishConnection();
}
public boolean establishConnection()
{
String connName = "localhost";
String user = "";
String password = "";
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(connName,user, password);
System.out.println("connected");
return true;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
}
1) HW #7 will be due end of the week. I want comprehensive notes on connecting to, selecting, inserting, deleting, updating records from JAVA. By Wednesday, you should clean up your notes on Connecting to the DB.
2) Try setting up a connection class from JAVA to see if you can get it to work -- if you can't don't stress we'll figure it out. I have attached my sample from class.
Email me with questions -- we'll tear it up this week.
mm
=====
Sample Connection class:
import java.sql.Connection;
import java.sql.DriverManager;
public class DBSample {
private Connection conn;
public DBSample()
{
this.establishConnection();
}
public boolean establishConnection()
{
String connName = "localhost";
String user = "";
String password = "";
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(connName,user, password);
System.out.println("connected");
return true;
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
}
}
Home / Developer API / Tour / Get a Project - Solutions for Bug & Issue Tracking, Collaboration Tools, Subversion Hosting, Git Hosting
Ahs webdev is powered by Assembla.
0 Comments