📄 testchengji.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: TestChengji.java
package mypackage;
import java.io.PrintStream;
import java.sql.*;
// Referenced classes of package mypackage:
// DataBaseConnection
public class TestChengji
{
private Connection con;
public TestChengji()
{
con = null;
con = DataBaseConnection.getConnection();
}
public ResultSet executeQuery(String s, String s1, String s2)
throws SQLException
{
String s3 = "{call pro_chengji(?,?,?)}";
CallableStatement callablestatement = con.prepareCall(s3);
callablestatement.setString(1, s);
callablestatement.setString(2, s1);
callablestatement.setString(3, s2);
ResultSet resultset = callablestatement.executeQuery();
return resultset;
}
public static void main(String args[])
throws SQLException
{
String s = "2003";
String s1 = "软件1班";
String s2 = "03-04第1学期";
TestChengji testchengji = new TestChengji();
ResultSet resultset = testchengji.executeQuery(s, s1, s2);
ResultSetMetaData resultsetmetadata = resultset.getMetaData();
int i = resultsetmetadata.getColumnCount();
for (int j = 3; j <= i; j++)
System.out.print(resultsetmetadata.getColumnName(j) + " ");
System.out.println("\n");
for (; resultset.next(); System.out.print("\n"))
{
for (int k = 1; k <= i; k++)
System.out.print(resultset.getString(k) + " ");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -