I went back to C + + with Visual C + + 2008 Express to develop a small program ... i have a concern about the display of a result of a mysql query:
Code:
if (! mysql_real_connect (mySQL, "localhost", "root ",""," stock, 0, NULL, 0))
(
textBox1-> Text = "error";
)
else
(
if (! mysql_query (mysql, "SELECT * FROM suppliers WHERE id = 2"))
(
result = mysql_store_result (mySQL);
textBox2-> Text = System:: Convert:: ToString (mysql_num_fields (result));
while (column = mysql_fetch_row (result))
(
textBox1-> Text = System:: Convert:: ToString (column [1]);
)
mysql_free_result (result);
)
else
(
textBox1-> Text = "no result";
)
)
mysql_close (mysql);
When I run the program, I can see "True" in the textBox1 instead of the value that is in my database ... Which appears in the textBox2 is correct. Thank you for your help!
Bookmarks