‎2007 Aug 10 2:36 PM
Hi everybody, I am having a problem when i try to do an insert in a ms sql external database. I am caching the errors, but it doesnt show error. Its like that the operation was executed well, but when i read the table, the records inserted are not there. Wich could be the problem?
Regards
‎2007 Aug 10 6:38 PM
Hi,
Have you given commit ?
Like the following
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
IF SY-SUBRC <> 0.
EXEC SQL.
CONNECT TO :con_name
ENDEXEC.
IF SY-SUBRC <> 0.
* error handling " <<<<< Error Handling
ENDIF.
ENDIF.
EXEC SQL.
* ... "<<< your code to do something
ENDEXEC.
* Commit the changes on 'con_name'
EXEC SQL.
COMMIT. "<<<<<<< Commit work
ENDEXEC.
EXEC SQL.
SET CONNECTION DEFAULT
ENDEXEC.
aRs
‎2007 Aug 10 6:38 PM
Hi,
Have you given commit ?
Like the following
EXEC SQL.
SET CONNECTION :con_name
ENDEXEC.
IF SY-SUBRC <> 0.
EXEC SQL.
CONNECT TO :con_name
ENDEXEC.
IF SY-SUBRC <> 0.
* error handling " <<<<< Error Handling
ENDIF.
ENDIF.
EXEC SQL.
* ... "<<< your code to do something
ENDEXEC.
* Commit the changes on 'con_name'
EXEC SQL.
COMMIT. "<<<<<<< Commit work
ENDEXEC.
EXEC SQL.
SET CONNECTION DEFAULT
ENDEXEC.
aRs
‎2007 Aug 15 2:32 PM