ConnectorLib Java 25.1
ConnectorLib Java SDK Programming Guide

# Insert Records

After you have created a datastore table, you can add records to it:

           DatastoreRecord newRecord = new DatastoreRecord();
           newRecord.setString("Reference", "C:\\data\\file1.txt");
           newRecord.setString("LastModified", "2013/07/30 14:36:00");

           datastore.recordInsert("Documents", newRecord);

This example creates a record, sets values for each column, and inserts the record into the table created in Create Tables. You can set column values using the `setString`, `setLong`, and `setBoolean` methods on the record.

Although you can set any fields you like in the Record, an exception is thrown from the `recordInsert` method if you try to set fields that are not in the table.

Copyright 2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery ConnectorLib Java 25.1

Topic Title: Insert Records