hi all;i have this agent in java :
import lotus.domino.*;
import com.ibm.as400.access.*;
import java.sql.*;
public class JavaAgent extends AgentBase {
public void NotesMain()
{
try
{
Connection dbConn = null;
Statement st=null;
System.out.println(“3”);
DriverManager.registerDriver(new com.ibm.as400.access.AS400JDBCDriver());
dbConn = DriverManager.getConnection (“jdbc:as400://” + “ASPBNK01”, “FBSSUSERP”, “FBSSUSERP”);
st = dbConn.createStatement();
String qString=new String();
qString = “SELECT CRBNO FROM ABPDATALIB.RMO”;
ResultSet rs=st.executeQuery(qString);
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Database db = agentContext.getCurrentDatabase();
Document doc = db.createDocument();
String s;
while (rs.next())
{
doc.appendItemValue(“Form”, “MT_103”);
doc.appendItemValue(“BRANCHCODE”,“ASPBGRAA”);
s = rs.getString(“CRBNO”);
doc.appendItemValue(“RECEIVINGBANK”,s);
doc.save();
}
}
catch(Exception e)
{e.printStackTrace();}
}
}
this agent compiles succesfully and run without buggs but
i have a form with a button and this button calls the agent but everytime i call the agent to run from the form i get “the page cannot be display” and ofcourse nothing works.
can you help me? this agent supposed to create documents with fields from the database.
thank you
ioanna