<?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: how to insert binary data using vc++ in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842176#M4873019</link>
    <description>&lt;P&gt;For me your Func_Info looks like a c++ preprocessor makro so check your header files for the implementation, maybe from there you can identify what and how it should be done.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2011 07:45:08 GMT</pubDate>
    <dc:creator>MCMartin</dc:creator>
    <dc:date>2011-06-16T07:45:08Z</dc:date>
    <item>
      <title>how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaq-p/13842175</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am an engineering student working on a project in which sql anywhere
will works as a back-end database.
I have faced a problem to insert binary data into tables using&lt;/P&gt;
&lt;P&gt;FUNC_INFO( extern, void, &lt;EM&gt;esqlentry&lt;/EM&gt;, dbpp_execute_imm, (SQLCA &lt;EM&gt;,char
&lt;/EM&gt;,unsigned short int ))&lt;/P&gt;
&lt;P&gt;I also try to run FUNC_INFO( extern, void, &lt;EM&gt;esqlentry&lt;/EM&gt;, dbpp_prepare,
(SQLCA &lt;EM&gt;,char &lt;/EM&gt;,char &lt;EM&gt;,short int &lt;/EM&gt;,char &lt;EM&gt;,struct sqlda &lt;/EM&gt;,unsigned int
)), but fails because there is no documentation found on net about
these functions.&lt;/P&gt;
&lt;P&gt;Please guide me, I am waiting for a reply.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 04:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaq-p/13842175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-16T04:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842176#M4873019</link>
      <description>&lt;P&gt;For me your Func_Info looks like a c++ preprocessor makro so check your header files for the implementation, maybe from there you can identify what and how it should be done.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 07:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842176#M4873019</guid>
      <dc:creator>MCMartin</dc:creator>
      <dc:date>2011-06-16T07:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842177#M4873020</link>
      <description>&lt;P&gt;The dbpp_* entry points are for use by ESQL programs and calls to them are generated by the ESQL preprocessor: sqlpp. Users are not supposed to write code to call these functions directly. See &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/pg-esql.html"&gt;http://dcx.sybase.com/index.html#1201/en/dbprogramming/pg-esql.html&lt;/A&gt; for information on using ESQL.&lt;/P&gt;
&lt;P&gt;BTW, are you required to use ESQL for your project? Possibly you could use ODBC, .NET, or perhaps even a scripting language such as python or perl?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2011 08:50:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842177#M4873020</guid>
      <dc:creator>johnsmirnios</dc:creator>
      <dc:date>2011-06-16T08:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842179#M4873022</link>
      <description>&lt;P&gt;Hello john,
              Thanks for your reply.................
              Actually I need to use Embedded SQL because of my project requirement and I am using   dblib.dll for this purpose. I need to insert data in Long Binary type field of SQL AnyWhere table .
I need to use parametrized query for this and I have used functions of dblib.dll to insert data in table,
but I have  header file containing function declaration , so I am unable to implement the function to prepare statement using dblib.dll. Following is prototype of function:&lt;/P&gt;
&lt;P&gt;FUNC_INFO( extern, void, &lt;EM&gt;esqlentry&lt;/EM&gt;, dbpp_prepare, (SQLCA &lt;EM&gt;,char &lt;/EM&gt;,char &lt;EM&gt;,short int &lt;/EM&gt;,char &lt;EM&gt;,struct sqlda &lt;/EM&gt;,unsigned int ))&lt;/P&gt;
&lt;P&gt;I could not get any documentation describing the parameters of this function .
How can I prepare a statement using functions of this dll and Execute it to insert binary data.&lt;/P&gt;
&lt;P&gt;Please help me out as I am new to this Embedded SQL concept....&lt;/P&gt;
&lt;P&gt;Waiting for positive response...............&lt;/P&gt;
&lt;P&gt;Thanks
Amit Chauhan&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2011 06:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842179#M4873022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-20T06:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842180#M4873023</link>
      <description>&lt;P&gt;When developing with Embedded SQL, you write C/C++ source usually as a .sqc file that has embedded &lt;CODE&gt;'EXEC SQL ...'&lt;/CODE&gt; statements to actually connect and interact with the database server.  Then you preprocess your .sqc to a .c file using &lt;CODE&gt;sqlpp&lt;/CODE&gt; (this changes the EXEC SQL ... statements to call the internal &lt;CODE&gt;dbpp_...&lt;/CODE&gt; functions).  Then you compile the .c file as usual.  Please read the dcx documentation link that John posted.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2011 08:41:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842180#M4873023</guid>
      <dc:creator>ian_mchardy</dc:creator>
      <dc:date>2011-06-20T08:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842181#M4873024</link>
      <description>&lt;P&gt;I have dynamically loaded dblib.dll and Using its functions to interact with database. But I do not know how to execute parametrized query using  functions of dblib.dll. I have seen &lt;CODE&gt;dbpp_prepare, (SQLCA *,char *,char *,short int *,char *,struct sqlda *,unsigned int ))&lt;/CODE&gt; but I don't know how to implement this function to prepare a statement because of missing  argument list documentation. Can you guide me how to use functions of this dll to execute a parametrized query?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2011 07:46:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842181#M4873024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-21T07:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842178#M4873021</link>
      <description>&lt;P&gt;It is unsupported and undocumented to call dbpp_prepare directly.  You must use embedded SQL (EXEC SQL...) and use the sqlpp pre-processor.&lt;/P&gt;
&lt;P&gt;To insert binary data into a table using Embedded SQL, you may want to do something like the following (assuming the data to be inserted is in source_data, and the table you want to insert into is my_table with one column):&lt;/P&gt;
&lt;P&gt;EXEC SQL BEGIN DECLARE SECTION;&lt;/P&gt;
&lt;P&gt;DECL_LONGBINARY(100000) binary_host_var;&lt;/P&gt;
&lt;P&gt;EXEC SQL END DECLARE SECTION;&lt;/P&gt;
&lt;P&gt;memcpy( binary_host_var.array, source_data, source_data_len );&lt;/P&gt;
&lt;P&gt;binary_host_var.stored_len = source_data_len;&lt;/P&gt;
&lt;P&gt;db_string_connect( &amp;amp;sqlca, "uid=dba;pwd=sql" );&lt;/P&gt;
&lt;P&gt;EXEC SQL INSERT INTO my_table values( :binary_host_var );&lt;/P&gt;
&lt;P&gt;EXEC SQL COMMIT;&lt;/P&gt;
&lt;P&gt;db_string_disconnect( &amp;amp;sqlca );&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2011 08:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842178#M4873021</guid>
      <dc:creator>ian_mchardy</dc:creator>
      <dc:date>2011-06-21T08:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842182#M4873025</link>
      <description>&lt;P&gt;What exactly do you mean with &lt;EM&gt;"everything at run time dynamically"&lt;/EM&gt;?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Loading the DLL dynamically? (cf. &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynamic-loading.html"&gt;http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynamic-loading.html&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;Specifying DML statements dynamically? (cf. &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynstat.html"&gt;http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynstat.html&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;Dynamic SELECT statements? (&lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynsel.html"&gt;http://dcx.sybase.com/index.html#1201/en/dbprogramming/dynsel.html&lt;/A&gt;)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I'm sure there are even more infos available but I would strongly recommend to have a look at the docs.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2011 07:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842182#M4873025</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-06-27T07:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842183#M4873026</link>
      <description>&lt;P&gt;I want all things are dynamically not static.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2011 04:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842183#M4873026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-29T04:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842184#M4873027</link>
      <description>&lt;P&gt;Amit, have you read any of the suggested documentation? - IMHO, it should really answer your questions.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2011 04:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842184#M4873027</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2011-06-29T04:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842185#M4873028</link>
      <description>&lt;P&gt;I saw all suggested documents already, please check link below:
&lt;A href="ftp://58.130.54.4/cmis/ediasoft100315/ediasoft/asa9/SQL%20Anywhere%209/h/sqlfuncs.h"&gt;ftp://58.130.54.4/cmis/ediasoft100315/ediasoft/asa9/SQL%20Anywhere%209/h/sqlfuncs.h&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now I want to know about ant documentation or another help how can I use the functions of "sqlfuncs.h", I done all works except insertion of binary, long binary &amp;amp; long varchar data.
Please help me.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 00:40:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842185#M4873028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-05T00:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert binary data using vc++</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842186#M4873029</link>
      <description>&lt;P&gt;I saw all suggested documents already, please check link below: &lt;A href="ftp://58.130.54.4/cmis/ediasoft100315/ediasoft/asa9/SQL%20Anywhere%209/h/sqlfuncs.h"&gt;ftp://58.130.54.4/cmis/ediasoft100315/ediasoft/asa9/SQL%20Anywhere%209/h/sqlfuncs.h&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now I want to know about ant documentation or another help how can I use the functions of "sqlfuncs.h", I done all works except insertion of binary, long binary &amp;amp; long varchar data. Please help me.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2011 03:02:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-insert-binary-data-using-vc/qaa-p/13842186#M4873029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-06T03:02:23Z</dc:date>
    </item>
  </channel>
</rss>

