ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Run SQL Script in RDi Causing SQLCODE -7008 SQLSTATE 55019

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

  • Run SQL Script in RDi Causing SQLCODE -7008 SQLSTATE 55019

    I am attempting to run an SQL script from RDi (Database Development Perspective) that uses an INSERT INTO. I get the following error message:

    MYFILE in MYLIB not valid for operation.. SQLCODE=-7008, SQLSTATE=55019, DRIVER=4.18.60

    After researching this error, it seems very likely that my SQL statement is not running as COMMIT = *NONE. I confirmed that I can successfully execute this statement using RUNSQLSTM COMMIT(*NONE) from a command line. When I change the COMMIT option to COMMIT(*CHG) it fails for the same reason as listed above.

    I tried adding an optional parameter to my Data Source connection property for autocommit = false, but this did not seem to help.

    Any ideas how I can get execute an SQL statement from the RDi Database Development perspective when it contains an INSERT INTO?



  • #2
    I typically just journal the table that you are inserting to, MYFILE in your example.

    Comment


    • #3
      Thanks for your response Scott. Still looking for a way to turn off commitment control when executing an SQL statement from RDi.

      Comment


      • #4
        Just add With NC at the end of the insert statement.
        With NC stands for "With NO Commit"

        Birgitta

        Comment


        • #5
          Birgitta,

          You need to open up some sort of online account where we can pay you for these answers. ;-) Thanks a ton!

          Comment


          • #6
            Originally posted by TheZenbudda View Post
            Birgitta,

            You need to open up some sort of online account where we can pay you for these answers. ;-) Thanks a ton!
            Good idea

            Comment

            Working...
            X