悟
悟峰
Unregistered / Unconfirmed
GUEST, unregistred user!
lass SimpleExample
{
public static void main(String args[])
{
String url="jdbcdbc:test";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection=DriverManager.getConnection(url,"sa","");
String sql="select * from sysobjects";
System.out.println("Native form:"+connection.nativeSQL(sql));
Statement statement=connection.createStatement();
ResultSet rs=statement.executeQuery(sql);
connection.close();
}
catch (Exception ex)
{
System.out.println("A problem occurred during the establishment of thd connection:"+ex);
}
}
}
我得到的顯示結果是:
Native form:select * from sysobjects
為什么?
{
public static void main(String args[])
{
String url="jdbcdbc:test";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection=DriverManager.getConnection(url,"sa","");
String sql="select * from sysobjects";
System.out.println("Native form:"+connection.nativeSQL(sql));
Statement statement=connection.createStatement();
ResultSet rs=statement.executeQuery(sql);
connection.close();
}
catch (Exception ex)
{
System.out.println("A problem occurred during the establishment of thd connection:"+ex);
}
}
}
我得到的顯示結果是:
Native form:select * from sysobjects
為什么?