P�ricles, bom dia.
Voce poderia me mandar o arquivo .jar que contem este
pacote de acesso( lotus.domino.* e
lotus.jdbc.domino.* ), ou me indicar onde posso encontra-
lo na net ?
Obrigado.
>
> ---------- In�cio da mensagem original -----------
> De: "Pericles Oliveira" <[EMAIL PROTECTED]>
> Para: [EMAIL PROTECTED]
> Cc:
> Data: Mon, 22 Apr 2002 06:44:49 -0400
> Assunto: Re: [java-list] Acesso ao Lotus Notes
>
> Tente isto:
>
>
> import lotus.domino.*;
> import lotus.jdbc.domino.*;
> import java.awt.*;
> import java.awt.event.*;
> import java.io.*;
> import java.sql.*;
> import java.lang.String.*;
> import java.net.URL;
>
> public class JDBCApp {
> private Frame main;
> private Panel butPanel;
> private Button okButton;
> private Button cancelButton;
> private TextArea txtOutput;
> private TextArea txtInput;
> private Connection con;
> private Statement stmnt;
> private ResultSet rs;
> private ResultSetMetaData rsmd;
> private String sql;
> private Font font;
>
> public void initialiseGUI() {
> //Setup the GUI here...
> main = new Frame();
> main.addWindowListener(
> new WindowAdapter() {
> public void windowClosing
(WindowEvent e) {
> System.exit(0);
> }
> }
> );
>
> font = new Font("Courier",0, 10);
> butPanel = new Panel();
> txtOutput = new TextArea();
> txtOutput.setFont(font);
> txtOutput.setEditable(false);
> txtInput = new TextArea();
> txtInput.setEditable(true);
> okButton = new Button("OK");
> okButton.setSize(20,10);
> okButton.addActionListener(new eventDoQuery
());
> cancelButton = new Button("Cancel");
> cancelButton.setSize(20,10);
> cancelButton.addActionListener(new
eventCancelQuery());
>
> butPanel.add(okButton, BorderLayout.WEST);
> butPanel.add(cancelButton,
BorderLayout.EAST);
> main.add(txtOutput, BorderLayout.NORTH);
> main.add(txtInput, BorderLayout.CENTER);
> main.add(butPanel, BorderLayout.SOUTH);
> main.setSize(600, 300);
> main.setVisible(true);
> }
>
> private void cancelQuery() throws Exception {
> //cleans up UI...
> txtOutput.append("Query cancelled by
user\n");
> txtInput.setText("");
> }
>
> private void doQuery() throws Exception {
> //do SQL query into Notes db...
> sql = txtInput.getText();
> txtOutput.append("\n***" + sql + "***\n
Executing...\n");
> stmnt = con.createStatement();
> rs = stmnt.executeQuery(sql);
> rsmd = rs.getMetaData();
> }
>
> private void outputResult() throws Exception {
> //formats and outputs the results to
txtOutput...
> //Overly complex but produces a nice output
> //number of columns
> int columnCount = rsmd.getColumnCount();
> //used to create the final output from the db
> String tmpString;
> String outString;
>
> // Array to hold max display size per column
> int[] maxColumnDispSize = new int
[columnCount+1];
>
>
> //display the column headings
> for (int i=1; i<= columnCount; i++) {
> //get column label - needed the
metadata to do this
> String label = rsmd.getColumnLabel(i);
> //store the maximum of display size or
label length
> if (label.length() > 10)
> maxColumnDispSize[i] = label.length
();
> else
> maxColumnDispSize[i] = 10;
> txtOutput.append(label);
> //pad with blanks
> for (int j=1; j<=maxColumnDispSize[i]-
label.length(); j++)
> txtOutput.append(" ");
> txtOutput.append(" ");
> }
> txtOutput.append("\n");
>
> //underline headings - glorification
> for (int i=1; i<=columnCount; i++) {
> for (int j=0; j<maxColumnDispSize[i];
j++)
> txtOutput.append("-");
> txtOutput.append(" ");
> }
> txtOutput.append("\n");
>
> //output the data
> while (rs.next()) {
> for(int i=1; i<=columnCount; i++) {
> Object obj = rs.getObject(i);
> boolean nl = rs.wasNull();
> if (nl)
> txtOutput.append("null");
> else
> {
> //get the first 10 characters
> tmpString = obj.toString();
> outString =
tmpString.substring(0,10);
> txtOutput.append(outString
+ " ");
> }
> }
> txtOutput.append("\n");
> }
> }
>
> private void closeDB(String DB) {
> //close connection general tidy up after...
> try {
> stmnt.close();
> con.close();
> } catch(SQLException se) {
> se.printStackTrace();
> }
> txtOutput.append("\nConnection with " + DB
+ " closed\n");
> }
>
> class eventDoQuery implements ActionListener {
> public void actionPerformed(ActionEvent e) {
> //calls to form and execute query...
> try {
> connectDB("JDBCTest.nsf", "<your
server here>");
> doQuery();
> outputResult();
> closeDB("JDBCTest.nsf");
> } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
> }
>
> class eventCancelQuery implements ActionListener {
> public void actionPerformed(ActionEvent e) {
> //call to clean up UI...
> try {
> cancelQuery();
> } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
> }
>
>
> public void connectDB(String DB, String Server) {
> //connect to db here...
> String url = "jdbc:domino:/"+DB+"/"+Server;
> try {
> Class.forName
("lotus.jdbc.domino.DominoDriver");
> }catch (ClassNotFoundException ce) {
> System.out.println
("ClassNotFoundException: " +
> ce.getMessage());
> }
> try {
> con = DriverManager.getConnection
(url,"","");
> } catch (SQLException se) {
> System.out.println("SQLException: " +
se.getMessage());
> }
>
> }
>
>
> public static void main(String[] args) {
> //run the app from here...
> JDBCApp instance = new JDBCApp();
> instance.initialiseGUI();
> System.out.println("Started Application\n");
> }
>
> }
> __________________________
> Atenciosamente,
> P�ricles Oliveira
> Coordenador de Rede
> (92)-652-1103
>
>
>
>
> "Cristiano
> Burg" Para:
<[EMAIL PROTECTED]>
> <burg@visionnai
cc:
> re.com.br>
Assunto: Re: [java-list] Acesso ao Lotus
>
Notes
>
18/04/2002
>
16:32
> Responder
a
> java-
list
>
>
>
>
>
>
> Uma op��o � JNI.
>
> Cristiano Burg
> Desenvolvimento
> [EMAIL PROTECTED]
> Visionnaire Inform�tica
> R. Gra Nicco, 113 - Bl 2 5� Andar
> Curitiba - PR - Brasil - 81200-200
> ( Fone:+55(41) 373-7400 - Ramal 208
> ( Fax: +55(41) 373-7400 - Ramal 201
>
> ----- Original Message -----
> From: "Robinson" <[EMAIL PROTECTED]>
> To: "SouJava" <[EMAIL PROTECTED]>
> Sent: Thursday, April 18, 2002 9:33 AM
> Subject: [java-list] Acesso ao Lotus Notes
>
>
> Ola Pessoal
>
> Estou desenvolvendo um projeto de Work Flow, para
> comunicar minha base de dados Oracle a uma ferramenta
de
> Work Flow "Lotus Notes".
> Pretendo criar uma classe, onde atrav�z de uma
> verifica��o em uma table Oracle(JDBC), uma vez
existindo
> alguma mensagem, est� deve ser transmitida para o Notes
> do destinat�rio, acessando suas dll�s.
> Minha pergunta �, qual a melhor forma de fazer isso,
> seria utilizando CORBA ?
>
> desde j� agrade�o.
>
> Robinson.
>
>
> Robinson D. Soares
>
>
>
>
_________________________________________________________
_________________
> Quer ter seu pr�prio endere�o na Internet?
> Garanta j� o seu e ainda ganhe cinco e-mails
personalizados.
> Dom�niosBOL - http://dominios.bol.com.br
>
>
>
> ------------------------------ LISTA SOUJAVA ----------
------------------
> http://www.soujava.org.br - Sociedade de Usu�rios
Java da Sucesu-SP
> d�vidas mais comuns: http://www.soujava.org.br/faq.htm
> regras da lista: http://www.soujava.org.br/regras.htm
> historico: http://www.mail-archive.com/java-list%
40soujava.org.br
> para sair da lista: envie email para java-list-
[EMAIL PROTECTED]
> -------------------------------------------------------
------------------
>
>
> ------------------------------ LISTA SOUJAVA ----------
------------------
> http://www.soujava.org.br - Sociedade de Usu�rios
Java da Sucesu-SP
> d�vidas mais comuns: http://www.soujava.org.br/faq.htm
> regras da lista: http://www.soujava.org.br/regras.htm
> historico: http://www.mail-archive.com/java-list%
40soujava.org.br
> para sair da lista: envie email para java-list-
[EMAIL PROTECTED]
> -------------------------------------------------------
------------------
>
>
>
>
>
> ------------------------------ LISTA SOUJAVA ----------
------------------
> http://www.soujava.org.br - Sociedade de Usu�rios
Java da Sucesu-SP
> d�vidas mais comuns: http://www.soujava.org.br/faq.htm
> regras da lista: http://www.soujava.org.br/regras.htm
> historico: http://www.mail-archive.com/java-list%
40soujava.org.br
> para sair da lista: envie email para java-list-
[EMAIL PROTECTED]
> -------------------------------------------------------
------------------
>
>
Robinson D. Soares
__________________________________________________________________________
Quer ter seu pr�prio endere�o na Internet?
Garanta j� o seu e ainda ganhe cinco e-mails personalizados.
Dom�niosBOL - http://dominios.bol.com.br
------------------------------ LISTA SOUJAVA ----------------------------
http://www.soujava.org.br - Sociedade de Usu�rios Java da Sucesu-SP
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED]
-------------------------------------------------------------------------