星期五, 八月 22, 2003

About sun.misc.* package

‘????^rt.jar??’?,?Q??”?“V.


星期四, 八月 21, 2003

Two better Java site,with many bussiness software

http://www.javaresearch.org
www.java.com.cn

Java Report

China Reseller????????_??×?±¨±íJReport
Origrin:http://www.jinfonet.com/regiconfirm.htm

星期日, 八月 10, 2003

JDBC-ODBC bridge skip DSN name tips.

//JDBC-ODBC 不用 odbc DSN 方法
import java.lang.*;
import java.sql.*;
import javax.sql.*;

public class testjo
{

public static void main(String[] args)
{
String odbcurl="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=stick.mdb"; //注意Driver和扩号(之间有空格
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection c = DriverManager.getConnection(odbcurl);

java.sql.Statement st = c.createStatement();
java.sql.ResultSet rs = st.executeQuery("select * from stickstory");

java.sql.ResultSetMetaData md = rs.getMetaData();
while(rs.next())
{
System.out.print("\nTUPLE: | ");
for(int i=1; i<= md.getColumnCount(); i++)
{
System.out.print(rs.getString(i) + " | ");
}
}
rs.close();
}catch (Exception e)
{
e.printStackTrace();
}
}
}