View previous topic :: View next topic |
Author |
Message |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Thu Oct 12, 2006 9:31 am Post subject: DSNREXX and Commit |
|
|
Code: |
DelRow = "DELETE FROM TABLEA WHERE COL1 = ?"
"EXECSQL PREPARE S1 FROM :DELROW"
Parms = 'AAAA BBBB CCCC DDDD EEEE........'
Do I = 1 by 1 while Parms <> ''
parse value Parms Parm Parms
Parm = "'"Parm"'"
"EXECSQL EXECUTE S1 USING :PARM"
If 0 = I // 10 then "EXECSQL COMMIT" <-- works without a COMMIT
End
"EXECSQL COMMIT"
|
The above code works fine without executing a COMMIT inside the DO loop. If a COMMIT is executed, Sqlcode = -518 (The statement named in the EXECUTE statement has not been prepared). How can I preserve the PREPARE statement after a COMMIT. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|