<?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: DBCO Connection in ABAP program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382379#M1642988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Catch the CX_SY_NATIVE_SQL_ERROR exception to get to know the error message. If you are already doing so, provide the error messages ( short and long messages ) when it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: DB_EXCEP TYPE REF TO CX_SY_NATIVE_SQL_ERROR.
*-Connect Native DB
  CLEAR: DB_CON_STATUS.
  TRY.
      EXEC SQL.
        connect to :db_name as :sy-uname
      ENDEXEC.

      IF sy-subrc EQ 0.
        db_con_status = 'X'.
      ENDIF.

    CATCH cx_sy_native_sql_error INTO db_excep.
      clear e_dbmsg.
      CALL METHOD db_excep-&amp;gt;if_message~get_text
        RECEIVING
          result = e_dbmsg.

      CLEAR: e_dbmsg_long.
      CALL METHOD db_excep-&amp;gt;if_message~get_longtext
        RECEIVING
          result = e_dbmsg_long.          

    CLEANUP.
      Clear: db_name, e_dbname.
  ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suman Jagu on Nov 14, 2011 2:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Nov 2011 19:10:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-14T19:10:04Z</dc:date>
    <item>
      <title>DBCO Connection in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382378#M1642987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a test program in production to connect to the DBCO. It connects successfully but failed occasionally. Mean, every few minutes, the connection will become fail! Anyone of u have idea why this happened and how to resolve this? Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been tested my test program and the standard ADBC_TEST_CONNECTION at the same time. Sometimes, both are success. Sometimes, when the latter showed success connection, the former will be failed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 09:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382378#M1642987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-14T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: DBCO Connection in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382379#M1642988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Catch the CX_SY_NATIVE_SQL_ERROR exception to get to know the error message. If you are already doing so, provide the error messages ( short and long messages ) when it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Data: DB_EXCEP TYPE REF TO CX_SY_NATIVE_SQL_ERROR.
*-Connect Native DB
  CLEAR: DB_CON_STATUS.
  TRY.
      EXEC SQL.
        connect to :db_name as :sy-uname
      ENDEXEC.

      IF sy-subrc EQ 0.
        db_con_status = 'X'.
      ENDIF.

    CATCH cx_sy_native_sql_error INTO db_excep.
      clear e_dbmsg.
      CALL METHOD db_excep-&amp;gt;if_message~get_text
        RECEIVING
          result = e_dbmsg.

      CLEAR: e_dbmsg_long.
      CALL METHOD db_excep-&amp;gt;if_message~get_longtext
        RECEIVING
          result = e_dbmsg_long.          

    CLEANUP.
      Clear: db_name, e_dbname.
  ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suman Jagu on Nov 14, 2011 2:10 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 19:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382379#M1642988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-14T19:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: DBCO Connection in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382380#M1642989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi CNHO ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the below threads to solve your issue, i hope it will help you , All the best .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4539383"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="846228"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Saravana.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 05:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dbco-connection-in-abap-program/m-p/8382380#M1642989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-15T05:37:01Z</dc:date>
    </item>
  </channel>
</rss>

