Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HEAP tables and C++

Status
Not open for further replies.

swp0365

Programmer
Apr 14, 2003
1
US
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.

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);
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
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top