<?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: SQL Anywhere 17 build 6933 missing write_client_file() function in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834605#M4865448</link>
    <description>&lt;P&gt;Check the documentation for &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/93079d4ba8e44920ae63ffb4def91f5b/81fff5c66ce21014b874f075a2bdf6c4.html?version=17.0&amp;amp;q=write_client_file"&gt;write_client_file here&lt;/A&gt;. You need to ensure a number of privileges have been enabled/set before using this function. &lt;/P&gt;
&lt;P&gt;Also, you must be using a client API that uses the CmdSeq protocol (ODBC, dblib). If you are using any of the other APIs then this function cannot be used. What client API are you using?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 07:38:30 GMT</pubDate>
    <dc:creator>MarkCulp</dc:creator>
    <dc:date>2023-04-07T07:38:30Z</dc:date>
    <item>
      <title>SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaq-p/13834604</link>
      <description>&lt;P&gt;We want to write a downloaded file with scripting to a folder on the client machine. But the procedure &lt;EM&gt;write_client_file()&lt;/EM&gt; seems to be missing.
Has it been replaced? Has it something to do with having the proper rights.
The function is mentioned in the help files and I would expect that the function would be available.
The error we get:
&lt;/P&gt;&lt;PRE&gt;Could not execute statement.
Procedure 'write_client_file' not found
SQLCODE=-265, ODBC 3 State="42S02"
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 03:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaq-p/13834604</guid>
      <dc:creator>fvestjens</dc:creator>
      <dc:date>2023-04-07T03:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834605#M4865448</link>
      <description>&lt;P&gt;Check the documentation for &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/93079d4ba8e44920ae63ffb4def91f5b/81fff5c66ce21014b874f075a2bdf6c4.html?version=17.0&amp;amp;q=write_client_file"&gt;write_client_file here&lt;/A&gt;. You need to ensure a number of privileges have been enabled/set before using this function. &lt;/P&gt;
&lt;P&gt;Also, you must be using a client API that uses the CmdSeq protocol (ODBC, dblib). If you are using any of the other APIs then this function cannot be used. What client API are you using?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 07:38:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834605#M4865448</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2023-04-07T07:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834607#M4865450</link>
      <description>&lt;P&gt;We're trying to run the function from within a script in the database.&lt;/P&gt;
&lt;P&gt;But according to your comment this does not seem to be possible. This can only be achieved by creating a share on the client that is accessible from the server the database is running and then us xp_Write_file()&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 08:31:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834607#M4865450</guid>
      <dc:creator>fvestjens</dc:creator>
      <dc:date>2023-04-07T08:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834606#M4865449</link>
      <description>&lt;P&gt;That function should not be 'CALL'ed.  It should be executed either as SELECT or via a SET var =.  Here is an example:&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;set&lt;/SPAN&gt; &lt;SPAN&gt;temporary&lt;/SPAN&gt; &lt;SPAN&gt;option&lt;/SPAN&gt; &lt;SPAN&gt;allow_write_client_file&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'on'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt; &lt;SPAN&gt;//&lt;/SPAN&gt; &lt;SPAN&gt;permit&lt;/SPAN&gt; &lt;SPAN&gt;write_client_file&lt;/SPAN&gt; &lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;current&lt;/SPAN&gt; &lt;SPAN&gt;connection&lt;/SPAN&gt;
&lt;SPAN&gt;select&lt;/SPAN&gt; &lt;SPAN&gt;write_client_file&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'c:\\temp\\write_client_file.txt'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;'Testing write_client_file with SELECT'&lt;/SPAN&gt; &lt;SPAN&gt;);&lt;/SPAN&gt;
&lt;SPAN&gt;set&lt;/SPAN&gt; &lt;SPAN&gt;retval&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;write_client_file&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'c:\\temp\\write_client_file2.txt'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;'Testing write_client_file with SET'&lt;/SPAN&gt; &lt;SPAN&gt;);&lt;/SPAN&gt;

&lt;SPAN&gt;--&lt;/SPAN&gt; &lt;SPAN&gt;but&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt; &lt;SPAN&gt;will&lt;/SPAN&gt; &lt;SPAN&gt;report&lt;/SPAN&gt; &lt;SPAN&gt;Procedure&lt;/SPAN&gt; &lt;SPAN&gt;'write_client_file'&lt;/SPAN&gt; &lt;SPAN&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;found&lt;/SPAN&gt;
&lt;SPAN&gt;call&lt;/SPAN&gt; &lt;SPAN&gt;write_client_file&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt; &lt;SPAN&gt;'c:\\temp\\write_client_file3.txt'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;'Testing write_client_file with CALL'&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;It is also possible to further secure the feature with -sf.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 09:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834606#M4865449</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2023-04-07T09:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834608#M4865451</link>
      <description>&lt;P&gt;How and where do you execute that script? For example, it certainly is doable to run a script within a CmdSeq-based client on a user machine that accesses files on the client machine or on net shares that client can access... We do so.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 12:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834608#M4865451</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2023-04-07T12:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834609#M4865452</link>
      <description>&lt;P&gt;From a client application we call a stored procedure where we want to pass the location where to store the file on the client. The procedure first downloads a binary file using a web service and then needs to store it on the passed location on the client. The client application is a windows application that uses the ODBC driver to connect to the database.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 05:57:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834609#M4865452</guid>
      <dc:creator>fvestjens</dc:creator>
      <dc:date>2023-04-08T05:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Anywhere 17 build 6933 missing write_client_file() function</title>
      <link>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834610#M4865453</link>
      <description>&lt;P&gt;That should work but when the client file read/write is issued within a stored procedure (in contrast to via directly from the client code), it requires a particular ODBC callback, see &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/98ad9ec940e2465695685d98e308dff5/3bd928906c5f1014bba0c35a3bee0dd5.html?locale=en-US&amp;amp;q=Read%20Client%20file%20callback"&gt;here&lt;/A&gt;, in addition to the required privilege.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 12:05:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sql-anywhere-17-build-6933-missing-write-client-file-function/qaa-p/13834610#M4865453</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2023-04-08T12:05:48Z</dc:date>
    </item>
  </channel>
</rss>

