准备编写清理函数
This commit is contained in:
@@ -112,7 +112,61 @@ public class CpicximToXMNHS
|
||||
|
||||
public static void removePostedHmbXyxInfo( Vector<HmbXyxInfo> postedItems )
|
||||
{
|
||||
|
||||
Vector<HmbXyxInfo> items = new Vector<HmbXyxInfo>();
|
||||
HmbXyxInfo item = null;
|
||||
|
||||
Connection connection = null;
|
||||
Statement statement = null;
|
||||
ResultSet result = null;
|
||||
|
||||
try
|
||||
{
|
||||
Class.forName( "com.mysql.cj.jdbc.Driver" );
|
||||
|
||||
String url = CpicximToXMNHS.url;
|
||||
String userName = CpicximToXMNHS.userName;
|
||||
String password = CpicximToXMNHS.password;
|
||||
String sql = """
|
||||
delete from HmbXyxInfo_Update where xyxNo = ?""";
|
||||
|
||||
connection = DriverManager.getConnection( url, userName, password );
|
||||
statement = connection.prepareStatement(sql.trim());
|
||||
|
||||
for ( HmbXyxInfo info : postedItems)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
catch ( SQLException error )
|
||||
{
|
||||
try
|
||||
{
|
||||
connection.rollback();
|
||||
}
|
||||
catch ( SQLException e )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
error.printStackTrace();
|
||||
}
|
||||
catch ( ClassNotFoundException error )
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
statement.close();
|
||||
connection.close();
|
||||
}
|
||||
catch ( SQLException error )
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void postHmbList( Vector<HmbXyxInfo> items )
|
||||
|
Reference in New Issue
Block a user