JDBC Exception无法从套接字读取更多的数据
importjava.sql.*;publicclassTestJDBC{publicstaticvoidmain(String[]args)throwsExceptio...
import java.sql.*;
public class TestJDBC {
public static void main(String[] args) throws Exception {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@192.168.159.1:1521:PLSExtProc", "scott", "tiger");
Statement stmt =conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from dept");
while(rs.next()){
System.out.println(rs.getString("deptno"));
}
rs.close();
stmt.close();
conn.close();
}
} 展开
public class TestJDBC {
public static void main(String[] args) throws Exception {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@192.168.159.1:1521:PLSExtProc", "scott", "tiger");
Statement stmt =conn.createStatement();
ResultSet rs=stmt.executeQuery("select * from dept");
while(rs.next()){
System.out.println(rs.getString("deptno"));
}
rs.close();
stmt.close();
conn.close();
}
} 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
2015-07-31
展开全部
int a[11]={1,4,6,9,13,16,19,28,40,100};
int temp1,temp2,number,end,i,j;
printf("original array is:\n");
for(i=0;i<10;i++)
printf("%5d",a[i]);
printf("\n");
printf("insert a new number:");
scanf("%d",&number);
int temp1,temp2,number,end,i,j;
printf("original array is:\n");
for(i=0;i<10;i++)
printf("%5d",a[i]);
printf("\n");
printf("insert a new number:");
scanf("%d",&number);
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询