<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: INSERT doesn't work with EXEC SQL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418022#M1646304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this problem might be due to the Data types,&lt;/P&gt;&lt;P&gt;Instead of sending system variable directly itself, you try to make it as char then try..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Jan 2012 02:30:54 GMT</pubDate>
    <dc:creator>surajarafath</dc:creator>
    <dc:date>2012-01-08T02:30:54Z</dc:date>
    <item>
      <title>INSERT doesn't work with EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418021#M1646303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program where I try insert data in a external database ( Oracle ), the program run normally without erros, but the data is not commited in oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible de connection have a property to set some type of authorization to INSERT and UPDATE ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see below the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    EXEC SQL.&lt;/P&gt;&lt;P&gt;      CONNECT TO :CONNECTION&lt;/P&gt;&lt;P&gt;    ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;        SET CONNECTION :CONNECTION&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;        INSERT INTO AGRICOLA.TESTE(DATA, TESTE) VALUES(SYSDATE, :sy-uname)&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;        COMMIT&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;        SET CONNECTION DEFAULT&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;        DISCONNECT :CONNECTION&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jan 2012 19:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418021#M1646303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-07T19:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT doesn't work with EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418022#M1646304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this problem might be due to the Data types,&lt;/P&gt;&lt;P&gt;Instead of sending system variable directly itself, you try to make it as char then try..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Jan 2012 02:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418022#M1646304</guid>
      <dc:creator>surajarafath</dc:creator>
      <dc:date>2012-01-08T02:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT doesn't work with EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418023#M1646305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your time my friend, but still doesn't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I change the command for "UPDATE", but there isn't success&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXEC SQL.&lt;/P&gt;&lt;P&gt;        UPDATE AGRICOLA.TESTE SET TESTE = 'W' WHERE TESTE = 'A'&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 13:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418023#M1646305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-09T13:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT doesn't work with EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418024#M1646306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to add error management in your code like following sample :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lo_ref TYPE REF TO cx_sy_native_sql_error,
      lv_text TYPE string.
* ...
TRY.
    " ...
    EXEC SQL.
      INSERT INTO AGRICOLA.TESTE(DATA, TESTE) VALUES(SYSDATE, :sy-uname)
    ENDEXEC.
    " ...
  CATCH cx_sy_native_sql_error INTO lo_ref.
    lv_text = lo_ref-&amp;gt;get_text( ).
    MESSAGE lv_text TYPE 'I'. " or 'E'.
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 13:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418024#M1646306</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-01-09T13:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT doesn't work with EXEC SQL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418025#M1646307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check your return code after each call, not just the first one. And put out a different message for each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jan 9, 2012 9:37 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 14:36:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-doesn-t-work-with-exec-sql/m-p/8418025#M1646307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-01-09T14:36:52Z</dc:date>
    </item>
  </channel>
</rss>

