帮我看下哪错拉!谢谢拉!
import import java.sql.*;
class llb1
{ private Connection conn;
public static void main(String args[]){
String q="jdbc:odbc:TEXT";
try
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(java.lang.ClassNotFoundException e)
{
System.err.print("ClassNotFoundException:");
System.err.print(e.getMessage());
}
Connection conn=DriverManager.getConnection(q,"sa","8200657");
DatabaseMetaData dma=conn.getMetaData();
System.out.println(dma.getURL());
System.out.println("连接数据库成功!");
Statement stm=conn.createStatement();
ResultSet rs=stm.executeQuery("select sno from text2");
while(rs.next())
System.out.println("sno: "+rs.getString("sno"));
conn.close();
}
catch(Exception e){
e.printStackTrace();
}
}
}
其中我注册拉数据源TEXT,在数据库TEXT里面有表text2,
系统提示java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]对象名 'll
b' 无效。
谁可以告诉下我为什么吗?