<?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>Question Re: Error using ''sa_dbcapi_handle&amp;quot; in JavaScript External Environment with WIndows in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824702#M4855545</link>
    <description>&lt;P&gt;It appears to not reproduce with V5.6.0 ... 
I was using the same NodeJS V4.3.0 as you are running when I reproduced this ... but the issue was not reproduced by a collegue with V5.6.0.  {thanks Jack}&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2016 17:31:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-02-11T17:31:58Z</dc:date>
    <item>
      <title>Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaq-p/13824701</link>
      <description>&lt;P&gt;In trying to learn the JavaScript External Environment, I have encountered the following problem.&lt;/P&gt;
&lt;P&gt;According to the documentation and examples, you can connect to the callers database using 'sa_dbcapi_handle' in place of the connection parameters.&lt;/P&gt;
&lt;P&gt;While this works on Linux, it fails on Windows with the message:
&lt;/P&gt;&lt;PRE&gt;Could not execute statement.
Procedure 'test2' terminated with unhandled exception 'Error: Code: -739
Msg: db_init has not been called or the call to db_init failed'
SQLCODE=-91, ODBC 3 State="HY000"
Line 15, column 1
CALL test2()
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I've created a github gist (&lt;A href="https://gist.github.com/twilkinson/6036702fae6f29f62107" target="_blank"&gt;https://gist.github.com/twilkinson/6036702fae6f29f62107&lt;/A&gt;
) that illustrates the problem.&lt;/P&gt;
&lt;P&gt;There are 2 files:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;First copy &lt;EM&gt;tests.js&lt;/EM&gt; to &lt;EM&gt;C:\\Temp\\tests.js&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;Then using ISQL, connect to the 'SQL Anywhere 17 Demo' database and execute &lt;EM&gt;tests.sql&lt;/EM&gt;.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I'm running Windows-7, SA17 Developers Edition (17.0.0.1211) and node (v0.10.40).&lt;/P&gt;
&lt;P&gt;Has anyone else seen this?  Any suggestions?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 11:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaq-p/13824701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-10T11:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824703#M4855546</link>
      <description>&lt;P&gt;There are examples of using serverside connectivity this way in the
"%sqlanysamp17%\\SQLAnywhere\\ExternalEnvironments\\JavaScript\\"&lt;/P&gt;
&lt;P&gt;Do serverside.js and serverside.sql show the same issue in your setting as well?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 12:45:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824703#M4855546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-10T12:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824704#M4855547</link>
      <description>&lt;P&gt;Yes.  I tried to run those and had the same problem.
&lt;/P&gt;&lt;PRE&gt;Could not execute statement.
Procedure 'sjs_create_table' terminated with unhandled exception 'Error:
Code: -739 Msg: db_init has not been called or the call to db_init
failed'
SQLCODE=-91, ODBC 3 State="HY000"
Line 29, column 1
You can continue executing or stop.
-- Tests
call sjs_create_table()
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 13:00:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824704#M4855547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-10T13:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824705#M4855548</link>
      <description>&lt;P&gt;Never mind.  &lt;/P&gt;
&lt;P&gt;I just reproduce this with the 3rd example from &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/44bd58ff06b14d4db53b8632bb527558.html"&gt;"How to use JavaScript from the Database"&lt;/A&gt; page.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 13:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824705#M4855548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-10T13:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824702#M4855545</link>
      <description>&lt;P&gt;It appears to not reproduce with V5.6.0 ... 
I was using the same NodeJS V4.3.0 as you are running when I reproduced this ... but the issue was not reproduced by a collegue with V5.6.0.  {thanks Jack}&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 17:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824702#M4855545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-11T17:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824706#M4855549</link>
      <description>&lt;P&gt;Though it still fails for me on a Windows 8 imaged laptop.
hmmmm&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824706#M4855549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-11T18:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error using ''sa_dbcapi_handle" in JavaScript External Environment with WIndows</title>
      <link>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824707#M4855550</link>
      <description>&lt;P&gt;Actually, I'm running nodejs 0.10.40 - waiting for the update to the SA17 Developer Edition for node 4+ support.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 20:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-using-sa-dbcapi-handle-quot-in-javascript-external-environment-with/qaa-p/13824707#M4855550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-11T20:23:33Z</dc:date>
    </item>
  </channel>
</rss>

