当前位置: 技术问答>java相关
请对我访问的数据库程序段查错,解决问题送100分!!!!
来源: 互联网 发布时间:2015-09-07
本文导语: String url="jdbc:odbc:973_se590"; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection connection=DriverManager.getConnection(url,"sql_973","datashare"); //查询小麦光谱 String sql="select * from se590_brdf where ob_date='" + ...
String url="jdbc:odbc:973_se590";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection=DriverManager.getConnection(url,"sql_973","datashare");
//查询小麦光谱
String sql="select * from se590_brdf where ob_date='" + ob_date + "' and field_no='" + position + "' and rtrim(ltrim(objection))='冬小麦' and " + sql_dire;
Statement statement1=connection.createStatement(rs.TYPE_SCROLL_SENSITIVE,rs.CONCUR_UPDATABLE);
rs=statement1.executeQuery(sql);
int j=0;
String bj_time;
while (rs.next())
{ bj_time=rs.getString("field_no");
//System.out.println("bj_time");
for (j=0;j
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection=DriverManager.getConnection(url,"sql_973","datashare");
//查询小麦光谱
String sql="select * from se590_brdf where ob_date='" + ob_date + "' and field_no='" + position + "' and rtrim(ltrim(objection))='冬小麦' and " + sql_dire;
Statement statement1=connection.createStatement(rs.TYPE_SCROLL_SENSITIVE,rs.CONCUR_UPDATABLE);
rs=statement1.executeQuery(sql);
int j=0;
String bj_time;
while (rs.next())
{ bj_time=rs.getString("field_no");
//System.out.println("bj_time");
for (j=0;j