Delete an AS400DB2 table

This tip gives you code that will delete an AS400DB2 table.

This code will delete an AS400DB2 table.

  Code: import lotus.domino.*;
import java.sql.*;

public class JavaAgent extends AgentBase {
 public void NotesMain() {
          String url = "jdbc:AS400:servername";
  try {
   Session session = getSession();
   AgentContext agentContext = session.getAgentContext();

Connection con = 
(url, "login", "password");               
   Statement stmt = con.createStatement();
stmt.executeUpdate("DROP TABLE mdm.Profile1");

  } catch(Exception e) {

Do you have comments on this tip? Let us know.

This tip was submitted to the tip exchange by member Mike Marcavage. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on Java for Lotus Notes Domino

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...