<%@ page contentType="text/html;charset=gb2312"%> <%@ page import="java.lang.*"%> <%@ page import="java.sql.*"%> <%@ page import="java.util.*"%> <%@ page import="java.io.*"%> xxx <%Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); String url="jdbc:oracle:thin:@localhost:1521:orcl"; String user="oracle_admin"; String password="oracle_password"; Connection conn= DriverManager.getConnection(url,user,password); Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); String sql="SELECT 1,2,3,4,5,6,7,8,9,10 from user_info"; ResultSet rs=stmt.executeQuery(sql); while(rs.next()) {%> <%}%> <%rs.close(); stmt.close(); conn.close(); %>
12345678910
<%=rs.getString(1)%> <%=rs.getString(2)%> <%=rs.getString(3)%> <%=rs.getString(4)%> <%=rs.getString(5)%> <%=rs.getString(6)%> <%=rs.getString(7)%> <%=rs.getString(8)%> <%=rs.getString(9)%> <%=rs.getString(10)%>