丝路之行zhengdong.blog.chinaunix.net
zhengdong1987
全部博文(101)
MySQL(2)
AVR(0)
Android_APP(7)
SNMP(15)
Servlet(7)
html(1)
Jsp(1)
WEB(0)
Java编程(15)
MVC(0)
Eclipse(0)
Spring(0)
Tomcat(1)
应用(29)
qt(0)
Linux驱动(6)
2012年(3)
2011年(60)
2010年(38)
ayyicdms
曾德标
zwsolive
shuixing
zhangjie
jchaodon
tekkaman
大鬼不动
sswqzx
浪花小雨
Bsolar
wenfei63
dahai071
HuangWJ_
mxj30708
zxcvbnm4
alex1028
zjc06181
分类: Java
2011-03-21 14:36:06
try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); Connection con = DriverManager.getConnection ("jdbc:sqlserver://localhost:1433;DatabaseName=XXX","sa","XXX"); Statement stmt = con.createStatement(); ResultSet rst = stmt.executeQuery("select * from XXXX"); out.println("XXXXSxXXXrXXXXChasis_Serial_Number"); while(rst.next()) { out.println(""+rst.getString("XX_Ip")+""); out.println(""+rst.getString("XX")+""); out.println(""+rst.getString("SW_XX")+""); out.println(""+rst.getString("x_X_x_x")+""); out.println(""+rst.getString("x_x_x_x")+""); out.println(""+rst.getString("x_x_x_x")+""); out.println(""+rst.getString("x_x_x")+""); out.println(""); } out.println(""); rst.close(); stmt.close(); con.close(); } catch(Exception e){ e.printStackTrace(); }
上一篇:关于一个snmp的具体程序-9k
下一篇:数组
登录 注册