Manage Learn to apply best practices and optimize your operations.

Java code inserts data from Notes documents into a SQL table

Prepared statements let Lotus Notes Domino users update and insert data into tables. Check out this Java code, which retrieves data from documents and tests to see if the data exists in a SQL table. If it does exist, the data is updated. If it doesn't exist, the Java code inserts the data.

Related resources from
Java code shortens strings in a SQL table

How to execute a stored procedure in Lotus Notes Domino using Java

Prepared statements allow Lotus Notes/Domino users to update and insert data into tables without having to use special characters.

This Java code shows how to retrieve data from Lotus Notes documents, but with a twist. The code tests to see if the data already exists in a SQL table. If it does, the data is updated. If it doesn't exist, then the data is inserted.

Java to update/insert in SQL table
(Click on code for enlarged view and script download.)

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

This tip was submitted to the tip library by member Michael Marcavage. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on Java for Lotus Notes Domino



  • 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 ...