0
有人能告訴我什麼是在下面的Java代碼如何修復錯誤:未解決編制問題:語法錯誤令牌「RS」
//SelectTest.java
import java.sql.*;
public class SelectTest1
{
public static void main(String args[])throws Exception
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:oradsn","System","123");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select*from student");
{
while(rs.next())
{
System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "rs.getString(3));
}
rs.close();
st.close();
con.close();
}
}
}
'rs.getString(3)'前面沒有'+',請使用一些IDE – 2016-06-11 06:48:22