ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

JDBCR4 - Not sure which procedure(s) to use

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBCR4 - Not sure which procedure(s) to use

    The Business Analyst I work with keeps trying to break my brain! I have a request that requires that I connect to an SQL database, populate a table, hit a stored procedure to indicate we're ready, wait for a predetermined time, check to see if the 3rd party application is done, and then read the same file (that is now updated by the 3rd party).

    I'm fortunate that I have found Scott Klement's documents and programs and that a co-worker of mine has used it in the past to READ an SQL database. I think I've managed to get the JDBC driver and figure out the connection.

    Like my co-worker, I'm using JDBCR4. I'm just not sure which procedure(s) would be appropriate for inserting to the table.

    I'm thinking it might be JDBC_PrepStmt (conn : 'Insert Into.... which is from slide 25 in the "Accessing External Databases" presentation.

    Can anyone give me a push in the right direction?

    With much gratitude,
    Melissa




  • #2
    Yes, page 25, use JDBC_PrepStmt( ) then JDBC_set...( ) if you have "?" parm markers then JDBC_execPrepUpd( ).
    You can optionally just use jdbc_ExecUpd( ) which is equivalent to "Execute Immediate" in SQL but this might be a tad slower.

    Ringer

    Comment

    Working...
    X