package memo;
public class pro {
int sx,number;
int[] month=new int[500];
int[] year=new int[500];
double[] delta=new double[500];
double[] com=new double[500];
double[] tax=new double[500];
double[] y=new double[500];
public static void main
(String[] args
) { pro t=new pro();
}
pro(){
db="power";
tab="power";
int co,s,cr,ind;
int a1;
co=1;
cr=1;
ind=1;
select sub=new select();
sub.makedata(db,tab,"b1","c1");
number=sub.number;
ex=sub.v;
year=sub.year;
month=sub.month;
for(s=1;s<number+1;s++){
System.
out.
println(year
[s
]+"年"+month
[s
]+"月,"+ex
[s
]); }
}
int nx;
nx=0;
try{
return nx;
}
double nx;
nx=0;
try{
return nx;
}
}
package memo;
import java.sql.*;
class select{
int key;
int sx,number;
int[] year=new int[50000];
int[] month=new int[50000];
String url
= "jdbc:h2:"+db
+";create=true";
try
{
Class.forName("org.h2.Driver");
} catch (Exception ex
) { ex.
printStackTrace();}
sx=0;
try {
stx = dbx.createStatement();
sqx="select * from "+tab+" where com="+change(c1)+" and bus = "+change(b1);
rsx = stx.executeQuery(sqx);
if (rsx != null) {
while (rsx.next()) {
sx=sx+1;
v[sx]= rsx.getString("value");
year[sx]=rsx.getInt("year");
month[sx]=rsx.getInt("month");
}
}
number=sx;
rsx.close();
stx.close();
dbx.close();
} catch (Exception ex
) {ex.
printStackTrace();}
}
e="'"+word+"'";
return e;
}
}
最終更新:2015年08月02日 00:48