Show TOC

PublishingLocate this document in the navigation structure

Create a publisher, add rows, and complete the publishing process.

Procedure

  1. Create a publisher:
    NetEspPublisher publisher = project.create_publisher(null, error);
  2. Connect to the publisher:
    Publisher.connect(error);
  3. Get a stream:
    NetEspStream stream = project.get_stream("WIN2", error);
  4. Get the message writer:
    NetEspMessageWriter writer = publisher.get_message_writer(stream, error);
  5. Get and start the row writer, and set an opcode to insert one row:
    NetEspRelativeRowWriter rowwriter = writer.get_relative_row_writer(error);
    rowwriter.start_row(error);
    rowwriter.set_opcode(1, error);
    (Optional) If publishing in transaction mode, use these arguments to add multiple rows:
    NetEspRelativeRowWriter rowwriter = writer.get_relative_row_writer(error);
    for(int i=0; i<100; i++){
    	rowwriter.start_row(error);
    //add row columns' values
    rowwriter.end_row(error);
    }
  6. Publish data:
    rc = publisher.publish(writer, error);