<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - C/C++</title>
        <description>Forum for MySQL and C/C++.</description>
        <link>http://forums.mysql.com/list.php?45</link>
        <lastBuildDate>Thu, 20 Jun 2013 05:52:11 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?45,588503,588503#msg-588503</guid>
            <title>More than one mysql connection failed (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,588503,588503#msg-588503</link>
            <description><![CDATA[ we can connect mysql successfully first time. if we try More than one connection, then connection failed, throw error message failed to connect mysql, and failed to ping mysql.]]></description>
            <dc:creator>Arunkumar Ramachandran</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 13 Jun 2013 11:39:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,587543,587543#msg-587543</guid>
            <title>Is a “Load DATA” without a file (i.e., in memory) possible for MySQL and c++ (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,587543,587543#msg-587543</link>
            <description><![CDATA[ I want to insert about 80k row in sec to mysql server. currently I use regular INSERT.<br />
<br />
I want try to use LOAD DATA but I want LOAD data from memory(RAM). and not from file,that I have to wrtie to file and load it from mysqld.<br />
<br />
In java exist setLocalInfileInputStream()  but what about c++<br />
<br />
Is any way to do that? currently my system run on visual studio 2008<br />
thanks]]></description>
            <dc:creator>hery sham</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 28 May 2013 08:20:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,586623,586623#msg-586623</guid>
            <title>Linking errors (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,586623,586623#msg-586623</link>
            <description><![CDATA[ I'm trying to use C++ and SQL in Visual Studio, and trying to load a SQL example to make sure it's working.<br />
<br />
This is the example project taken from [url=&quot;[url]http://www.nitecon.com/tutorials-articles/develop/cpp/c-mysql-beginner-tutorial/&quot[/url];]link[/url]<br />
<br />
[code]<br />
<br />
#include &quot;my_global.h&quot; // Include this file first to avoid problems<br />
#include &quot;mysql.h&quot; // MySQL Include File<br />
#define SERVER &quot;localhost&quot;<br />
#define USER &quot;username&quot;<br />
#define PASSWORD &quot;password&quot;<br />
#define DATABASE &quot;databasename&quot;<br />
<br />
#include &lt;iostream&gt;<br />
using namespace std;<br />
<br />
#include &quot;my_global.h&quot; // Include this file first to avoid problems<br />
#include &quot;mysql.h&quot; // MySQL Include File<br />
#define SERVER &quot;localhost&quot;<br />
#define USER &quot;username&quot;<br />
#define PASSWORD &quot;password&quot;<br />
#define DATABASE &quot;databasename&quot;<br />
 <br />
int main()<br />
{<br />
    MYSQL *connect; // Create a pointer to the MySQL instance<br />
    connect=mysql_init(NULL); // Initialise the instance<br />
    /* This If is irrelevant and you don't need to show it. I kept it in for Fault Testing.*/<br />
    if(!connect)    /* If instance didn't initialize say so and exit with fault.*/<br />
    {<br />
        fprintf(stderr,&quot;MySQL Initialization Failed&quot;);<br />
        return 1;<br />
    }<br />
    /* Now we will actually connect to the specific database.*/<br />
 <br />
    connect=mysql_real_connect(connect,SERVER,USER,PASSWORD,DATABASE,0,NULL,0);<br />
    /* Following if statements are unneeded too, but it's worth it to show on your<br />
    first app, so that if your database is empty or the query didn't return anything it<br />
    will at least let you know that the connection to the mysql server was established. */<br />
 <br />
    if(connect){<br />
        printf(&quot;Connection Succeeded\n&quot;);<br />
    }<br />
    else{<br />
        printf(&quot;Connection Failed!\n&quot;);<br />
    }<br />
    MYSQL_RES *res_set; /* Create a pointer to recieve the return value.*/<br />
    MYSQL_ROW row;  /* Assign variable for rows. */<br />
    mysql_query(connect,&quot;SELECT * FROM TABLE&quot;);<br />
    /* Send a query to the database. */<br />
    unsigned int i = 0; /* Create a counter for the rows */<br />
 <br />
    res_set = mysql_store_result(connect); /* Receive the result and store it in res_set */<br />
 <br />
    unsigned int numrows = mysql_num_rows(res_set); /* Create the count to print all rows */<br />
 <br />
    /* This while is to print all rows and not just the first row found, */<br />
 <br />
    while ((row = mysql_fetch_row(res_set)) != NULL){<br />
        printf(&quot;%s\n&quot;,row<i> != NULL ?<br />
        row<i> : &quot;NULL&quot;); /* Print the row data */<br />
    }<br />
    mysql_close(connect);   /* Close and shutdown */<br />
<br />
	system(&quot;pause&quot;);<br />
	return 0;<br />
}<br />
<br />
[/code]<br />
<br />
Errors:<br />
<pre class="bbcode">
1&gt;------ Build started: Project: connectSQL, Configuration: Debug Win32 ------
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_close@4 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_fetch_row@4 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_num_rows@4 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_store_result@4 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_query@8 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_real_connect@32 referenced in function _main
1&gt;main.obj : error LNK2019: unresolved external symbol _mysql_init@4 referenced in function _main
1&gt;C:\Users\Shawn\Documents\Visual Studio 2010\Projects\connectSQL\Debug\connectSQL.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</pre>
<br />
Include/Headers/Libs:<br />
<pre class="bbcode">
VC++ Directories-&gt;Include Directory-&gt;C:\Program Files\MySQL\MySQL Server 5.6\include
VC++ Directories-&gt;Library Directory-&gt;C:\Program Files\MySQL\MySQL Server 5.6\lib
VC++ Directories-&gt;Bin Directory-&gt;C:\Program Files\MySQL\MySQL Server 5.6\bin

Linker-&gt;Input-&gt;Additional Dependencies-&gt;libmysql.lib</pre>
<br />
And I put <i>libmysql.lib</i> in <i>Program Files(x86)-&gt;Microsoft Visual Studio 10.0-&gt;VC-&gt;lib</i> which is where I believe i'm supposed to put it.</i></i>]]></description>
            <dc:creator>shawn andrews</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 17 May 2013 16:14:52 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,585172,585172#msg-585172</guid>
            <title>How to read/write sql file in c++ without sql server installation ? (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,585172,585172#msg-585172</link>
            <description><![CDATA[ is it possible to read / write sql file without installing mysql or sql server ?? , if yes so how ??<br />
<br />
thanks alot.]]></description>
            <dc:creator>Mai Saad</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 30 Apr 2013 08:57:26 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,583911,583911#msg-583911</guid>
            <title>Run SQL Script in C++ (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,583911,583911#msg-583911</link>
            <description><![CDATA[ Hi,<br />
<br />
I have myfile.sql file. In mysql I just type source myfile.sql to run the script. But how can I do it in C++?  have tried using mysql_real_query() but doesnt work. Can anyone help me? Appreciate that. Thanks.]]></description>
            <dc:creator>amar wani</dc:creator>
            <category>C/C++</category>
            <pubDate>Sun, 14 Apr 2013 10:03:24 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,582837,582837#msg-582837</guid>
            <title>MySQL multithreading app and sigfault when reconnect to MySQL into worker thread (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,582837,582837#msg-582837</link>
            <description><![CDATA[ 0 down vote favorite<br />
	<br />
<br />
I have multithreading application client to MySQL and I use MySQL C-client (libmysqlclient_r). I have db connections pool, where I open connection before create thread workers (pthread_create).<br />
<br />
The each worker gets only single connection from connections pool before starting the work and puts it to the pool after finishing work. The each worker use it's unique connection.<br />
<br />
But, database server is very overload, and MySQL client have errors: MySQL &quot; Lost connection to MySQL server during query&quot; or &quot; MySQL server has gone away&quot;. My application make reconnect in the worker thread:<br />
<br />
<br />
<br />
<pre class="bbcode">
my_bool res = mysql_ping(c-&gt;mysql);
if (res) {
    mysql_close(c-&gt;mysql);
    mysql_thread_end();

    c-&gt;mysql = mysql_init(NULL);
    mysql_thread_init();                

    struct conn_desc *cd = &amp;c-&gt;db-&gt;cds[c-&gt;num];
    syslog(LOG_ERR, &quot;reconnect :[%s:%d]\t%s\tnew MySQL=%X tid=%X\n&quot;, cd-&gt;host,  cd-&gt;port, c-&gt;db-&gt;default_db_name, c-&gt;mysql, pthread_self());

    res = mysql_real_connect(c-&gt;mysql, cd-&gt;host, cd-&gt;login, cd-&gt;passwd, c-&gt;db-&gt;default_db_name, cd-&gt;port, NULL, 0);
    if (res == NULL) {
        syslog(LOG_ERR, &quot;[restart ] reconnect Error\n&quot;);
        exit(1);
    }
}</pre>
<br />
<br />
Sometime, I have sigmentation fault into mysql_ping() or mysql_real_connect(). Why? I use the separate mysql-connections between workers threads. What is wrong? How is making the Right?]]></description>
            <dc:creator>Alexandre Kalendarev</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 01 Apr 2013 12:10:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,581747,581747#msg-581747</guid>
            <title>C API prepared insert truncates strings to 5 characters (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,581747,581747#msg-581747</link>
            <description><![CDATA[ Hi,<br />
<br />
I have written a couple of small C API programs in the past but this is my first time to use prepared statements.  What I am doing compiles and runs but the resulting strings in the target table are all chopped to 5 characters.<br />
<br />
I can not see what would limit the string length in the code<br />
<br />
The target table:<br />
<br />
<pre class="bbcode">
mysql&gt; describe log;
+--------------+------------------+------+-----+---------+----------------+
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| id           | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| machine      | varchar(64)      | NO   | MUL | NULL    |                |
| date         | datetime         | NO   | MUL | NULL    |                |
| event        | varchar(8)       | NO   | MUL | NULL    |                |
| netid        | varchar(16)      | NO   | MUL | NULL    |                |
| domain       | varchar(32)      | NO   | MUL | NULL    |                |
| line         | varchar(64)      | NO   | MUL | NULL    |                |
| source       | varchar(8)       | NO   | MUL | NULL    |                |
| dateInserted | datetime         | NO   | MUL | NULL    |                |
| notes        | varchar(128)     | NO   |     | NULL    |                |
+--------------+------------------+------+-----+---------+----------------+</pre>
<br />
The insert code:<br />
<br />
<pre class="bbcode">
int insertIntoDB(MYSQL *mysql, struct env PEnv, char *date, char *source) {

    char *insertSQL = &quot;\
INSERT INTO personalDB.log \
            (id, event, machine, netid, line, source, date) \
VALUES(NULL, UPPER(?), UPPER(?), UPPER(?), UPPER(?), UPPER(?), NOW())&quot;;

    char *tmp;
    char *datePtr;

    int numBindCols = 5;
    int col = 0;

    int result = 0;

    unsigned long bufferLength = 0;

    MYSQL_STMT *sth;

    if (DEBUG) {
        syslog(LOG_AUTHPRIV | LOG_INFO, &quot;insertIntoDB: start&quot;);
    }

    /*
     * &quot;date&quot; will usually be NULL. If not NULL it will be in ISO std
     * YYYY-MM-DD HH:mm:SS format.  If we have a date string, modify the 
     * insert statement to accept a bind value for the date -- i.e. replace
     * the &quot;NOW()&quot; in the insert string with a &quot;?&quot;
     */

    if (date != NULL ) {
        tmp = strstr(insertSQL, &quot;NOW())&quot;);
        if (tmp != NULL ) {
            tmp = &quot;?)&quot;;
            numBindCols++;
        }
    }

    /*
     * setup the statement
     */

    if ((sth = mysql_stmt_init(mysql)) != NULL ) {
        /*
         * setup the prepare
         */
        if (mysql_stmt_prepare(sth, insertSQL, strlen(insertSQL)) == 0) {
            MYSQL_BIND bind[numBindCols];
            memset(bind, 0, sizeof(bind));

            bind[col].buffer_type = MYSQL_TYPE_STRING;
            bind[col].buffer = (void *) PEnv.event;
            bind[col].is_unsigned = 0;
            bind[col].is_null = 0;
            bind[col].buffer_length = 8;
            bufferLength = strlen(PEnv.event);
            bind[col++].length = &amp;bufferLength;
            if (DEBUG) {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: event=%s/%lu&quot;, PEnv.event,
                        bufferLength);
            }

            bind[col].buffer_type = MYSQL_TYPE_STRING;
            bind[col].buffer = (void *) PEnv.rhost;
            bind[col].is_unsigned = 0;
            bind[col].is_null = 0;
            bind[col].buffer_length = 64;
            bufferLength = strlen(PEnv.rhost);
            bind[col++].length = &amp;bufferLength;
            if (DEBUG) {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: rhost=%s/%lu&quot;, PEnv.rhost,
                        bufferLength);
            }

            bind[col].buffer_type = MYSQL_TYPE_STRING;
            bind[col].buffer = (void *) PEnv.user;
            bind[col].is_unsigned = 0;
            bind[col].is_null = 0;
            bind[col].buffer_length = 16;
            bufferLength = strlen(PEnv.user);
            bind[col++].length = &amp;bufferLength;
            if (DEBUG) {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: user=%s/%lu&quot;, PEnv.user,
                        bufferLength);
            }

            bind[col].buffer_type = MYSQL_TYPE_STRING;
            bind[col].buffer = (void *) PEnv.service;
            bind[col].is_unsigned = 0;
            bind[col].is_null = 0;
            bind[col].buffer_length = 64;
            bufferLength = strlen(PEnv.service);
            bind[col++].length = &amp;bufferLength;
            if (DEBUG) {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: service=%s/%lu&quot;,
                        PEnv.service, bufferLength);
            }

            bind[col].buffer_type = MYSQL_TYPE_STRING;
            bind[col].buffer = (void *) source;
            bind[col].is_unsigned = 0;
            bind[col].is_null = 0;
            bind[col].buffer_length = 8;
            bufferLength = strlen(source);
            bind[col++].length = &amp;bufferLength;
            if (DEBUG) {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: source=%s/%lu&quot;, source,
                        bufferLength);
            }

            /*
             * do we have a date string?
             * ... I've not tested this section yet, not sure if the 
             * strtol's will do what I want ...
             */
            if (numBindCols &gt; col) {
                if (DEBUG) {
                    syslog(LOG_AUTHPRIV | LOG_INFO,
                            &quot;insertIntoDB: numBindCols=%d,col=%d&quot;,
                            numBindCols, col);
                }

                MYSQL_TIME localDate;
                localDate.year = strtol(date, &amp;datePtr, 10);
                datePtr++;
                localDate.month = strtol(datePtr, &amp;datePtr, 10);
                datePtr++;
                localDate.day = strtol(datePtr, &amp;datePtr, 10);
                datePtr++;
                localDate.hour = strtol(datePtr, &amp;datePtr, 10);
                datePtr++;
                localDate.minute = strtol(datePtr, &amp;datePtr, 10);
                datePtr++;
                localDate.second = strtol(datePtr, &amp;datePtr, 10);

                bind[col].buffer_type = MYSQL_TYPE_DATETIME;
                bind[col].buffer = &amp;localDate;
                bind[col].is_unsigned = 0;
                bind[col].is_null = 0;
                bufferLength = sizeof(localDate);
                bind[col++].length = &amp;bufferLength;
                if (DEBUG) {
                    syslog(LOG_AUTHPRIV | LOG_INFO,
                            &quot;insertIntoDB: date=%s/%lu&quot;, date,
                            bufferLength);
                }
            }

            if (mysql_stmt_bind_param(sth, bind) == 0) {
                if (mysql_stmt_execute(sth) != 0) {
                    syslog(LOG_AUTHPRIV | LOG_INFO,
                            &quot;insertIntoDB: MySQL could not execute: %s&quot;,
                            mysql_stmt_error(sth));
                    result = __LINE__;
                }
            } else {
                syslog(LOG_AUTHPRIV | LOG_INFO,
                        &quot;insertIntoDB: MySQL could not bind values: %s&quot;,
                        mysql_stmt_error(sth));
                result = __LINE__;
            }
        } else {
            syslog(LOG_AUTHPRIV | LOG_INFO,
                    &quot;insertIntoDB: MySQL could not prepare query: %s&quot;,
                    mysql_stmt_error(sth));
            result = __LINE__;
        }

        mysql_stmt_free_result(sth);
        mysql_stmt_close(sth);
    } else {
        syslog(LOG_AUTHPRIV | LOG_INFO,
                &quot;insertIntoDB: MySQL could not init statement: %s&quot;,
                mysql_stmt_error(sth));
        result = __LINE__;
    }

    if (DEBUG) {
        syslog(LOG_AUTHPRIV | LOG_INFO, &quot;insertIntoDB: end&quot;);
    }

    return result;
}
</pre>]]></description>
            <dc:creator>7 reeds</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 19 Mar 2013 15:11:56 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,579901,579901#msg-579901</guid>
            <title>reading binary logs using c api (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,579901,579901#msg-579901</link>
            <description><![CDATA[ I am using ubuntu 12.04 and want to write a c program which will act like a mysql slave and will read the remote system's mysql binary log and will update the database of the system on which it is running. I have tried but unable to find any c api available for this. In short I want to write my own mysql database replication code.<br />
<br />
I have found one link <a href="http://intuitive-search.blogspot.in/2011/07/binary-log-api-and-replication-listener.html"  rel="nofollow">http://intuitive-search.blogspot.in/2011/07/binary-log-api-and-replication-listener.html</a> but the info is related to c++.]]></description>
            <dc:creator>sunil datta</dc:creator>
            <category>C/C++</category>
            <pubDate>Sun, 24 Feb 2013 17:17:00 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,579725,579725#msg-579725</guid>
            <title>want to learn (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,579725,579725#msg-579725</link>
            <description><![CDATA[ please help admin i want to learn  c,C++]]></description>
            <dc:creator>anindya chakravorty</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 22 Feb 2013 15:23:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,579034,579034#msg-579034</guid>
            <title>unresolved external symbol _mysql_get_client_info@0 (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,579034,579034#msg-579034</link>
            <description><![CDATA[ I'm using visual studio 2010, trying the very simple first C tutorial:<br />
#include &quot;my_global.h&quot;<br />
#include &quot;mysql.h&quot;<br />
<br />
int main(int argc, char **argv)<br />
{<br />
  printf(&quot;MySQL client version: %s\n&quot;, mysql_get_client_info());<br />
}<br />
I'm including libmysql.lib in the linker input, and I can ensure that the linker is reading that file, because if I rename it it tells me it can't find it. However it does not link because of this error:<br />
MySQLTest.obj : error LNK2019: unresolved external symbol _mysql_get_client_info@0 referenced in function _main<br />
<br />
I hope that someone can give me a clue of where to fix this problem. Thank you.]]></description>
            <dc:creator>Dale Cordeiro</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 12 Feb 2013 19:33:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,577354,577354#msg-577354</guid>
            <title>mysql-connection-1.1 link problems (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,577354,577354#msg-577354</link>
            <description><![CDATA[ I get lots of unresolved link errors when attempting to link the the example/connection,cpp program.  I'm using Visual Studio 2012 Pro on Windows 7, the mysql server is on a different computer on my LAN.  I downloaded the source code for the connection-c++, and I'm trying to compile the example connection.cpp program.<br />
<br />
I tried linking to mysqlcppconn.lib, which linked ok but the program filed to run.  MS-Windows producted error message something about can not run the program.<br />
<br />
Then I tried linking to the static library mysqlcppconn-static.lib.  This produces the unresolved errors below.<br />
<br />
<pre class="bbcode">
&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: __thiscall sql::SQLString::~SQLString(void)&quot; (__imp_??1SQLString@sql@@QAE@XZ) referenced in function _main
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: __thiscall sql::SQLString::SQLString(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)&quot; (__imp_??0SQLString@sql@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: __thiscall sql::SQLString::SQLString(char const * const)&quot; (__imp_??0SQLString@sql@@QAE@QBD@Z) referenced in function _main
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp; __thiscall sql::SQLString::asStdString(void)const &quot; (__imp_?asStdString@SQLString@sql@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function &quot;class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp; __cdecl std::operator&lt;&lt;(class std::basic_ostream&lt;char,struct std::char_traits&lt;char&gt; &gt; &amp;,class sql::SQLString const &amp;)&quot; (??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABVSQLString@sql@@@Z)
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp; __thiscall sql::SQLException::getSQLState(void)const &quot; (__imp_?getSQLState@SQLException@sql@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function __catch$_main$0
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) public: int __thiscall sql::SQLException::getErrorCode(void)const &quot; (__imp_?getErrorCode@SQLException@sql@@QBEHXZ) referenced in function __catch$_main$0
1&gt;connect.obj : error LNK2019: unresolved external symbol &quot;__declspec(dllimport) class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void)&quot; (__imp_?get_driver_instance@mysql@sql@@YAPAVMySQL_Driver@12@XZ) referenced in function _main
</pre>]]></description>
            <dc:creator>Melvin Stober</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 15 Jan 2013 03:39:49 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,577346,577346#msg-577346</guid>
            <title>Function Sequence Error (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,577346,577346#msg-577346</link>
            <description><![CDATA[ I'm trying to learn how to insert data into mysql running on a remote computer on my home LAN.  Everything works ok until the program attempts to insert a second row in a table.  The first row is inserted ok, but can't insert other rows without getting &quot;function sequence error&quot;.  I've tried moving around some of the code but it still gives me this error.  Here is the code<br />
<br />
The error occurs on the line<br />
  if(sql.ShowErrors(SQLExecute(hStmt),SQL_HANDLE_STMT,hStmt)==false)<br />
<br />
ShowErrors() does nothing more than all SQLGetDiagRec() if SQLExecute() returns an error.<br />
<br />
<pre class="bbcode">
UINT blnInsert(SQL&amp; sql)
{
 char* szStr[]={&quot;My Birthday&quot;,&quot;Walk On Moon?&quot;,&quot;Some String&quot;,&quot;April Fools Day&quot;};
 char* szDate[]={&quot;11/15/1952&quot;,&quot;6/30/1969&quot;,&quot;1/1/2006&quot;,&quot;4/1/2006&quot;};
 double dblNum[]={3.14159,1.23456,15.1234,0.54321};
 char  szQuery[100],szString[32],szBuffer[128];       //Let me give you a hint about something.  If you decide
 SQLINTEGER iNts=SQL_NTS;                             //to use raw ODBC as your database access methodology, the
 UINT i,id,iRet=FALSE;                                //hard part is SQLBindParameter() for inserting prepared
 TIMESTAMP_STRUCT ts;                                 //SQL statements, and SQLBindCol() for selecting data.  These
 SQLINTEGER iJnk;                                     //will inevitably take you some time to learn.  I chose an
 SQLHSTMT hStmt;                                      //integer, a double, a data, and a char string so as to get
 double dbl;                                          //you started on the most common data types.

 if(SQLAllocHandle(SQL_HANDLE_STMT,sql.hConn,&amp;hStmt)==SQL_SUCCESS)
 {
    strcpy((char*)szQuery,&quot;INSERT INTO Table1(Id, Float_Point, Date_Field, Text_Field) VALUES(?,?,?,?);&quot;);
    printf(&quot;                                                         SQLExecute(hStmt)\n&quot;);
    printf(&quot;iId      Double           Date           String           0=SQL_SUCCESS\n&quot;);
    printf(&quot;========================================================================\n&quot;);
    if(sql.ShowErrors(SQLPrepare(hStmt,(SQLTCHAR*)szQuery,SQL_NTS),SQL_HANDLE_STMT,hStmt)==false)
    {
       sql.ShowErrors(SQLBindParameter(hStmt,1,SQL_PARAM_INPUT,SQL_C_LONG,SQL_INTEGER,0,0,&amp;id,0,&amp;iJnk));
       sql.ShowErrors(SQLBindParameter(hStmt,2,SQL_PARAM_INPUT,SQL_C_DOUBLE,SQL_DOUBLE,0,0,&amp;dbl,0,&amp;iJnk));
       sql.ShowErrors(SQLBindParameter(hStmt,3,SQL_PARAM_INPUT,SQL_C_TYPE_DATE,SQL_TYPE_TIMESTAMP,16,0,&amp;ts,0,&amp;iJnk));
       sql.ShowErrors(SQLBindParameter(hStmt,4,SQL_PARAM_INPUT,SQL_C_TCHAR,SQL_CHAR,31,0,szString,strlen(szString), &amp;iNts));
       for(i=0;i&lt;4;i++)
       {
           id=i+1, dbl=dblNum<i>;
           ts=ParseDate(szDate<i>,&quot;mdy&quot;,&quot;/&quot;);
           strcpy(szString,szStr<i>);
           if(sql.ShowErrors(SQLExecute(hStmt),SQL_HANDLE_STMT,hStmt)==false)
           {
              memset(szBuffer,0,128);
              printf(&quot;%-6u%8.2f           %-12.10s  %-20s%6u\n&quot;,id,dbl,szDate<i>,szString,SQL_SUCCESS);
           }
       }
       iRet=TRUE;
       printf(&quot;\n&quot;);
    }
    SQLFreeHandle(SQL_HANDLE_STMT,hStmt);
 }

 return iRet;
}

</i></i></i></i></pre>]]></description>
            <dc:creator>Melvin Stober</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 14 Jan 2013 22:23:51 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,576971,576971#msg-576971</guid>
            <title>C Connector (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,576971,576971#msg-576971</link>
            <description><![CDATA[ I've got a Problem with the executing a query. <br />
For Example: Select * From Adr. The Query is working fine, but if i'll add an &quot;Order by&quot; (Select * From Adr Order by name) it takes very long until I get my Result.<br />
If I'll use the MYSQL Workbench to execute this Query all is fine. Only the C Connector is so slow. I have a feeling that the C Connector download the Result and Order it on the Client.]]></description>
            <dc:creator>Simon Ludwig</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 07 Jan 2013 14:35:51 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,576563,576563#msg-576563</guid>
            <title>Register time of connection getting broken with database (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,576563,576563#msg-576563</link>
            <description><![CDATA[ I am connecting to the database through C.<br />
<br />
Is there any way we can store the time at which connection is broken to the database.<br />
For example, if the connection to MySQL server is broken due to any reason, then the time of breaking the connection should be stored in a table in MySQL.<br />
<br />
How can this be implemented?]]></description>
            <dc:creator>Tushar Bindal</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 03 Jan 2013 06:22:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,576342,576342#msg-576342</guid>
            <title>1064 error with mysql_query, but it works with Mysql Workbench (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,576342,576342#msg-576342</link>
            <description><![CDATA[ Hello, I have no problem to execute the query well (I can see the rows), but in a C/C++ application code it throws this error at runtime.<br />
<br />
This is the code:<br />
<br />
query &lt;&lt; &quot;SELECT Nom_Pelic, Path, Dur_Hora, DUR_Minutos, DUR_Segundos, HH,MM,SS FROM PELICULAS,PROGRAMACION WHERE PELICULA.Cod_ID = PROGRAMACION.Cod_ID AND PROGRAMACION.Fecha = &quot; &lt;&lt; &quot;'&quot; &lt;&lt; fecha &lt;&lt; &quot;'&quot;;<br />
<br />
   if (mysql_query(&amp;conn,query.str().c_str()))<br />
   {<br />
<br />
   // throw error and quit<br />
   // ..................<br />
   }<br />
<br />
The query is as follows:<br />
<br />
SELECT Nom_Pelic, Path, Dur_Hora, DUR_Minutos, DUR_Segundos, HH,MM,SS FROM PELICULAS,PROGRAMACION WHERE PELICULA.Cod_ID = PROGRAMACION.Cod_ID AND PROGRAMACION.Fecha = '2012-10-11';<br />
<br />
Date format is yyyy-mm-dd<br />
Ubuntu 12.04<br />
MySQL Server 5.5.24.<br />
<br />
I appreciate any suggestions, cheers!]]></description>
            <dc:creator>rossana guerra</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 20 Dec 2012 00:45:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,573570,573570#msg-573570</guid>
            <title>reading a BIT field from a C++ application (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,573570,573570#msg-573570</link>
            <description><![CDATA[ Hello, I have field of type BIT(1), the query is made through C++ code.<br />
<br />
From MySQL Workbench i am cabable to see the stored values, but not from code.<br />
<br />
 cout &lt;&lt; &quot;row[0] &quot; &lt;&lt; row[0] &lt;&lt; &quot; row[1] &quot; &lt;&lt; row[1] &lt;&lt; endl;<br />
row[1] value appears empty.<br />
<br />
I tryed to cast<br />
<br />
cout &lt;&lt; &quot;row[0] &quot; &lt;&lt; row[0] &lt;&lt; &quot; row[1] &quot; &lt;&lt; bool(row[1]) &lt;&lt; endl;<br />
<br />
And every value is 1, and it is wrong.<br />
<br />
I know row<i> is a string types.<br />
<br />
I appreciate any suggestion,<br />
<br />
<br />
Thanks and regards</i>]]></description>
            <dc:creator>rossana guerra</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 12 Nov 2012 05:00:55 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,573251,573251#msg-573251</guid>
            <title>Executing mysql dump / restore within a C++ program (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,573251,573251#msg-573251</link>
            <description><![CDATA[ Hello there,<br />
<br />
I'm working on a project since a few month and I need to execute differents mysql dump and restore. For now, I simply used the C++ function system() to execute my mysqldump command.<br />
<br />
But, with this solution, I can't handle the errors returned by mysql.<br />
<br />
I tried to run the command with _popen too. But the mysql (in restore case) command does not return anything (but it print errors in the console, stange).<br />
<br />
So my last hope to get the appropriates errors after a mysql restore, is to execute this command inside my program, with the mysql library.<br />
<br />
But here I am, because I've found nothing on the documentation about this, only about executing queries.<br />
<br />
Best Regards,<br />
Clement.]]></description>
            <dc:creator>Clément Villefranque</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 08 Nov 2012 11:33:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,573199,573199#msg-573199</guid>
            <title>problem with installing mysql c connector for mysql c++ connector (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,573199,573199#msg-573199</link>
            <description><![CDATA[ Hi there, <br />
<br />
I was wondering if anyone could help me. I've got XCode 4.2, and MAMP<br />
server. With XCode and have been trying to develop a C++ application to<br />
generate SQL commands to retrieve information from my MySQL database in<br />
the MAMP database. <br />
<br />
I wanted to download the Mysql C++ connector (extract tar file<br />
mysql-connector-c++-1.0.5-osx10.5-x86-64bit) but the tutorials say I<br />
need to download the Mysql C Connector (tar file<br />
mysql-connector-c-6.0.2-osx10.5-x86-64bit) because it needs the API<br />
first is that right? <br />
<br />
shown here-<br />
<a href="http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source.html"  rel="nofollow">http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source.html</a><br />
<br />
<br />
Anyway after downloading it onto this directory <br />
<br />
/Users/inhcheung/Documents/<br />
<br />
hence<br />
<br />
/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 <br />
<br />
I followed the instructions on this page<br />
<br />
<a href="http://dev.mysql.com/doc/refman/5.1/en/connector-c-building.html"  rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/connector-c-building.html</a> <br />
<br />
it tells me that for building this downloaded library i need to type<br />
this on my terminal<br />
<br />
shell&gt; cmake -G &quot;Unix Makefiles&quot;<br />
<br />
which meant i had to download cmake. But after downloading cmake with<br />
command line capabilities, and i typed this command within that<br />
directory it came up with the error that CMakelists.txt was not found. <br />
<br />
My solution was to create a file called 'CMakelists.txt'. I was able to<br />
run this command again with these results logged:<br />
<br />
Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$<br />
touch CMakeLists.txt<br />
Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$<br />
cmake -G &quot;Unix Makefiles&quot;<br />
-- The C compiler identification is GNU 4.2.1<br />
-- The CXX compiler identification is GNU 4.2.1<br />
-- Checking whether C compiler has -isysroot<br />
-- Checking whether C compiler has -isysroot - yes<br />
-- Checking whether C compiler supports OSX deployment target flag<br />
-- Checking whether C compiler supports OSX deployment target flag -<br />
yes<br />
-- Check for working C compiler: /usr/bin/cc<br />
-- Check for working C compiler: /usr/bin/cc -- works<br />
-- Detecting C compiler ABI info<br />
-- Detecting C compiler ABI info - done<br />
-- Checking whether CXX compiler has -isysroot<br />
-- Checking whether CXX compiler has -isysroot - yes<br />
-- Checking whether CXX compiler supports OSX deployment target flag<br />
-- Checking whether CXX compiler supports OSX deployment target flag -<br />
yes<br />
-- Check for working CXX compiler: /usr/bin/c++<br />
-- Check for working CXX compiler: /usr/bin/c++ -- works<br />
-- Detecting CXX compiler ABI info<br />
-- Detecting CXX compiler ABI info - done<br />
-- Configuring done<br />
-- Generating done<br />
-- Build files have been written to:<br />
/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2<br />
<br />
I could see that cmake files have been placed on /usr/local as described<br />
in the tutorial.<br />
<br />
Now I assume that the mysql C connector has now been built. The next<br />
stage of the tutorial is to install it, which is to type this in the<br />
root shell:<br />
<br />
root-shell&gt; make install<br />
<br />
I don't know what the root shell is relative to the terminal that I'm<br />
already using, so I assume I just type it out anyway, but the result I<br />
got was not what I expected:<br />
<br />
Ivans-MacBook-Pro:mysql-connector-c-6.0.2-osx10.5-x86-64bit 2 inhcheung$<br />
make install<br />
make: *** No rule to make target `install'.  Stop<br />
<br />
what could be causing this? am I in the correct directory? assuming that<br />
the tutorial wants me to be in the 'MySQL Connector/C source directory'<br />
but I'm not sure where that is. Bear in mind I'm still in where the tar<br />
file was being extracted:<br />
<br />
/Users/inhcheung/Documents/mysql-connector-c-6.0.2-osx10.5-x86-64bit 2<br />
<br />
I've been stuck on trying to install this connector for a few days so I<br />
really would like some help on this!<br />
<br />
<br />
Many thanks!<br />
<br />
Kind Regards<br />
<br />
Ivan Cheung]]></description>
            <dc:creator>Ivan Cheung</dc:creator>
            <category>C/C++</category>
            <pubDate>Wed, 09 Jan 2013 14:59:16 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,573188,573188#msg-573188</guid>
            <title>mysql_init bounds overrun on g++ 64 bit (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,573188,573188#msg-573188</link>
            <description><![CDATA[ Anyone experienced a bounds overrun with mysql_init(&amp;mysql_object) on g++ 64 bit?<br />
<br />
Try:<br />
<br />
MYSQL mysql;<br />
int   nGuard[8];<br />
<br />
mysql_init(&amp;mysql); // nGuard is overwritten by 24 bytes on this call<br />
<br />
<br />
Version 5.5.25.3.12.1<br />
openSUSE 12.1 (64 bit)<br />
<br />
Thanks,<br />
<br />
Jan]]></description>
            <dc:creator>Jan Millar</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 16 Nov 2012 02:51:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,571328,571328#msg-571328</guid>
            <title>Debugging ndb client C/C++ application (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,571328,571328#msg-571328</link>
            <description><![CDATA[ Hello, All!<br />
<br />
Is there a way to prolong internal ndbclient library timeouts?<br />
The problem is this:<br />
when I break my application on a breakpoint and wait for some (very-very little, about 1-2 seconds) time, any nearest following operation related to DB will fail with either &quot;timeout&quot; or &quot;cluster node fail&quot; error.<br />
It is very hard to debug application when you have no time to take a look at variables or think for a while ...<br />
<br />
Best wishes,<br />
Mike.]]></description>
            <dc:creator>Michael Kupchuk</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 08 Nov 2012 06:13:13 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,571166,571166#msg-571166</guid>
            <title>TinyInt wasn't stored well into the table when reading from a int C++ type. (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,571166,571166#msg-571166</link>
            <description><![CDATA[ Hello everyone, in my C++ code I have field table named tiene_sub, it stores and integer (0 or 1).<br />
The corresponding field in the table has a TINYINT type, however the insert didn't store anything readable, a little rectangle. :S<br />
<br />
query &lt;&lt; &quot;Insert Ignore into Peliculas (Cod_Pelic,Nom_Pelic,Path, Tiene_Sub, Fecha_Ing, Categoria, Genero, Director, Artistas) VALUES ( &quot; &lt;&lt; cod &lt;&lt; &quot;, &quot; &lt;&lt; nom_pelic &lt;&lt; &quot;, &quot; &lt;&lt; path &lt;&lt; &quot;, &quot; &lt;&lt; tiene_sub &lt;&lt; &quot;, &quot; &lt;&lt; t &lt;&lt; &quot;, &quot; &lt;&lt; categ &lt;&lt; &quot;, &quot; &lt;&lt; genero &lt;&lt; &quot;, &quot; &lt;&lt; director &lt;&lt; &quot;, &quot; &lt;&lt; artistas &lt;&lt; &quot;)&quot;; <br />
<br />
I appreciate any suggestion on this. Thanks<br />
<br />
Regards<br />
<br />
Ross]]></description>
            <dc:creator>rossana guerra</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 18 Oct 2012 16:50:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,571080,571080#msg-571080</guid>
            <title>mysql_use_result returns NULL but no error set? (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,571080,571080#msg-571080</link>
            <description><![CDATA[ Hello.<br />
<br />
I have a problem at one of our customers, who runs MySQL 5.5.8.<br />
<br />
I have something like the following code:<br />
<br />
<pre class="bbcode">
MYSQL_RES *res;
MYSQL_ROW row;
MYSQL* mysql = XXX();
uint32 ret;
char* sqlQuery = &quot;SELECT MAX(id) FROM mytable&quot;;

ret = mysql_real_query(mysql, sqlQuery, (unsigned int)strlen(sqlQuery));
if (ret != 0)
{
  printf(&quot;### Error mysql_real_query: '%s'&quot;, mysql_error(mysql));
  return;
}

res = mysql_use_result(mysql);
if (res == NULL)
{
  printf(&quot;### Error mysql_use_result: '%s'&quot;, mysql_error(mysql));
  return;
}
...</pre>
<br />
But I have the following result:<br />
### Error mysql_use_result: ''<br />
<br />
I don't understand why mysql_use_result would return NULL and mysql_error is not set. By the way, there is also no reason why mysql_use_result returns NULL (the table is present and the request is returning value when run manually), but that's another story...<br />
<br />
Did you already have this problem, of having a function returning an error but the error is not set??? Where could I look to find more investigation elements?<br />
<br />
Thanks for your attention,<br />
Daniel]]></description>
            <dc:creator>Daniel Chiaramello</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 16 Oct 2012 07:08:33 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,570033,570033#msg-570033</guid>
            <title>Visual Studio Connection/Linking problem (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,570033,570033#msg-570033</link>
            <description><![CDATA[ Hi<br />
<br />
I am trying to create databse program using Visual Studio 2010 and using a MySQL database that I have created with the latest version of MySQL community version. My problem is Visual Studio keeps crashing. I have tried my best to explain the problem step by step as follows.<br />
<br />
1.	In Visual Studio go to File-&gt;New Project Select MFC Application. Enter a name for application in Name box and click OK<br />
2.	In Visual Studio go to File-&gt;New Project Select MFC Application. Enter a name for application in Name box and click OK (Ops. Sorry. I'm repeating myself. Ignore this step 2)<br />
3.	Click next until you get to Database Support. Select Database view with file support and ODBC under Client type: Then click Data Source button<br />
4.	In Select Data Source Dialog click New<br />
5.	In Create New Data Source Dialog scroll down and select MySQL ODBC 5.2w Driver. Then Click Next<br />
6.	Type in the name you want to call your data source and save it<br />
7.	Now MySQL Connector/ODBC Data Source Configuration dialog box pops up. Enter TCP/IP Server, User, Password, Select database and click Test. Test result dialog says Connection successful. So far so good<br />
8.	Now the first problem pops up. A Create Data Source dialog box saying The File Data Source was not saved.<br />
9.	After closing previous dialog box your saved .DSN appears. Select it and click OK<br />
10.	The MySQL Connector/ODBC Data Source Configuration Dialog box reappears with all fields filled out. Click OK<br />
11.	The Select Database Object dialog now appears showing your tables. Select the table you want and click OK<br />
12.	Your now back to MFC Application Wizard. Click finish and then the fun begins<br />
13.	Visual Studio crashes saying a problem has been encountered and then Visual Studio shutdowns and restarts<br />
<br />
I'm using Windows 7<br />
<br />
Thank you]]></description>
            <dc:creator>Geoff Wootton</dc:creator>
            <category>C/C++</category>
            <pubDate>Tue, 02 Oct 2012 22:40:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,569160,569160#msg-569160</guid>
            <title>MySql Cpp Connector and Load Statement (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,569160,569160#msg-569160</link>
            <description><![CDATA[ Team,<br />
<br />
I am using MySql C++ Connector. Iam forming load data local infile statement and executing query using execute statement as below: <br />
<br />
  string query = &quot;LOAD ....&quot;;<br />
  stmt = mSqlCon-&gt;createStatement();<br />
  bool ret;<br />
  if ( stmt != NULL )<br />
   {<br />
                        ret = stmt-&gt;execute(query);<br />
   }<br />
<br />
The same load statement works fine on sql prompt from cli though. But, when called through API ,this wont get execute and wont return anything. The program just exits as it is.<br />
<br />
Any idea? Or am i doing something wrong?<br />
<br />
Any help on this is appreciated!<br />
Santhosh]]></description>
            <dc:creator>santhosh edukulla</dc:creator>
            <category>C/C++</category>
            <pubDate>Fri, 16 Nov 2012 02:52:35 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,569071,569071#msg-569071</guid>
            <title>mysql_num_fields(resultset) always return 0 (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,569071,569071#msg-569071</link>
            <description><![CDATA[ Using mysql 5.5<br />
Using c API<br />
<br />
query: select * from table<br />
<br />
connect etc aand then<br />
mysql_query(conn, query);<br />
resultset = mysql_store_result(conn);<br />
if (resultset) {<br />
    	  numRows = mysql_num_rows(mysqlResult);<br />
    	  //numFields = mysql_field_count(conn);<br />
      	  numFields = mysql_num_fields(mysqlResult);<br />
          printf(&quot;Number of rows=%u  Number of fields=%u \n&quot;,numRows,numFields);<br />
} else {<br />
          printf(&quot;no results\n&quot;);<br />
<br />
<br />
Results in the following output:<br />
 Number of rows=34  Number of fields=0 <br />
<br />
It does not matter which of the 2 field count calls I use.<br />
I have tried different tables, the row count is always correct but the field count is always 0.]]></description>
            <dc:creator>Gerhard Smith</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 20 Sep 2012 12:53:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,568132,568132#msg-568132</guid>
            <title>disable error message (no replies)</title>
            <link>http://forums.mysql.com/read.php?45,568132,568132#msg-568132</link>
            <description><![CDATA[ We have Ubuntu 10.04.1 with mysql 5.1.63.<br />
We have an application in c that queries the database.<br />
We catch all the errors and put them in a file.<br />
But we want to disable the error message that you get on the console if the program creates an invalid sql command e.g. &quot;selfect * from can_commands&quot;.<br />
The only way to disable this is to start the program with a &gt;/dev/null on  the command line.<br />
Is there a way to suppress the message &quot;error: You have an error in your SQL syntax; check the manual.....&quot;?<br />
Thanks in advance.<br />
<br />
-Warner-]]></description>
            <dc:creator>Warner Krelekamp</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 10 Sep 2012 21:28:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,568095,568095#msg-568095</guid>
            <title>Linking C Language and MySQL (3 replies)</title>
            <link>http://forums.mysql.com/read.php?45,568095,568095#msg-568095</link>
            <description><![CDATA[ Hello, <br />
<br />
I want to write a C language based program which connects to a database, MySQL in this case. When i use EXEC SQL it can not compile, i tried adding some libraries but still no luck, i think i need to use another compiler.<br />
<br />
What do you say? Do i need to use another compiler?<br />
If yes, Which one?<br />
<br />
Regards.]]></description>
            <dc:creator>Hugo De Haro</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 08 Nov 2012 06:16:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,566775,566775#msg-566775</guid>
            <title>[Visual Studio 2010] Problems linking the static library &quot;mysqlclient.lib&quot; (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,566775,566775#msg-566775</link>
            <description><![CDATA[ Hello everyone,<br />
<br />
I am developping an application with Visual Studio C++ 2010 Express, and I need to link the MySQL library as static if possible (I don't know anything on the future user's server).<br />
<br />
So, I've linked mysqlclient.lib to my project, and SQLAPI++ if some you guys knows this API.<br />
<br />
I have no compiler errors, everything's nice, but when I launch my application on the server (Virtual Machine atm), I get a message telling me that libmySQL.dll can't be found on the server.<br />
<br />
But if I'm right, mysqlclient.lib is the static library and then doesn't need the libmysql.dll file on the server?]]></description>
            <dc:creator>Clément Villefranque</dc:creator>
            <category>C/C++</category>
            <pubDate>Thu, 20 Sep 2012 08:25:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,566761,566761#msg-566761</guid>
            <title>C (1 reply)</title>
            <link>http://forums.mysql.com/read.php?45,566761,566761#msg-566761</link>
            <description><![CDATA[ Multithreading?<br />
<br />
Regards,<br />
Sanoj.<br />
<br />
<br />
www.forexbulls.com]]></description>
            <dc:creator>forex bulls</dc:creator>
            <category>C/C++</category>
            <pubDate>Wed, 12 Sep 2012 18:50:17 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?45,564889,564889#msg-564889</guid>
            <title>where is the source code? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?45,564889,564889#msg-564889</link>
            <description><![CDATA[ Hi,<br />
<br />
  I am using MSVC10 to build a simple example from <br />
<a href="http://docs.oracle.com/cd/E17952_01/refman-5.1-en/connector-cpp-examples-complete-example-1.html"  rel="nofollow">http://docs.oracle.com/cd/E17952_01/refman-5.1-en/connector-cpp-examples-complete-example-1.html</a><br />
<br />
  I followed the steps in <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-apps-windows-visual-studio.html"  rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-apps-windows-visual-studio.html</a>.<br />
<br />
  I got a lot of link errors like that shown below. <br />
<br />
  Next, I want to build the libraries from the source code as suggested in the download page (http://dev.mysql.com/downloads/connector/cpp/). <br />
<br />
  Where can I download the source code? <br />
<br />
Error example:<br />
<br />
mysqlcppconn-static.lib(mysql_resultset_metadata.obj) : error LNK2001: unresolved external symbol &quot;__declspec(dllimport) public: __thiscall std::basic_ostringstream&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::basic_ostringstream&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt;&gt; const &amp;,int)&quot; (__imp_??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z)]]></description>
            <dc:creator>paul delamusica</dc:creator>
            <category>C/C++</category>
            <pubDate>Mon, 20 Aug 2012 15:06:45 +0000</pubDate>
        </item>
    </channel>
</rss>
