I'm working on a project using Microsoft Visual C++ 6.0, MySQL 3.23.49, and the MySQL C API. I'm having trouble with this code.
This code works fine when commset is a MyISAM table. However, I'm wanting to move to HEAP tables. When this code is run against a HEAP table, my program crashes. Looking at the code, pData->row_count has returned a value of 0. But when I type the query_string at the mysql prompt, I get a response
So far, I haven't seen anything on this in google.
Thanks for any help you guys can give
swp0365
Code:
#include "mysql.h"
.
.
MYSQL_RES *pData;
.
.
sprintf(query_string,"SELECT * FROM commset;");
(mysql_query(MySQL_connection, query_string));
pData=mysql_store_result(MySQL_connection);
MYSQL_ROW row=mysql_fetch_row(pData);
Code:
+-------+-----------------+
| Port | IPAddress |
+-------+-----------------+
| 13000 | ###.###.###.### |
+-------+-----------------+
1 row in set (0.12 sec)
So far, I haven't seen anything on this in google.
Thanks for any help you guys can give
swp0365