Seems a little ugly for what it does, but hey it’s OO-fantastic.
Statement stmt = null;
Connection con = null;
try
{
Class.forName(“com.microsoft.sqlserver.jdbc.SQLServerDriver”);
con = DriverManager.getConnection(connectionURL);
stmt=con.createStatement();
java.text.DateFormat df = new java.text.SimpleDateFormat(“MM/dd/yyyy”);
String startDate = df.format(date_var);
stmt.executeUpdate(“INSERT INTO XX (day_entry) VALUES (‘” + startDate + “‘);”);
}
catch(Exception e)
{
System.out.println(query);
e.printStackTrace();
}
finally
{
}
I spent a lot of time trying to diagnose this problem. What would happen is that when I would login to Ubuntu I would get the following message “CPU frequency scaling unsupported.”
There are two things that need to be done. First you have to make sure SpeedStepping is set. The way to activate this is to go into your setup when the computer starts up and check your processor settings.
The next thing you have to do is get a kernel that supports this chip. The standard 386 kernel that comes with the Ubuntu (Dapper/Edgy/Feisty) does not support it. You need to go into Synaptic and download the generic kernel.
By the way I spent hours trying to compile my own kernel since I didn’t know that prebuilt kernels existed as a package. Apparently the Ubuntu people don’t want us compiling our own kernels and have made it as difficult as possible. I got as far as I willing to go with the kernel compiling process. I got the kernel setup in the GRUB and loaded it, but the computer would stop somewhere while loading. There probably is no reason to compile your own kernel at this point. I don’t think having extra things turned on in the kernel will even make a difference at this point.
Download MSSQL Driver:
http://msdn2.microsoft.com/en-us/data/aa937724.aspx
Note: If you are running MSSQL 2000 the MSSQL 2005 driver will work for you too.
Add driver to eclipse project:
1. Right-click on the project then go to properties
2. ‘Java Build Path’
3. ‘Libraries’ tab
4. ‘Add External JAR’.
SQL Explorer in Eclipse:
Setup instructions