I have another problem(Of Course). I am testing out a short little program I found on a forum that connects to a MySql database and runs a query. From what I can tell, the syntax looks fairly correct, I just keep getting some build errors. I am running on XP, using .NET, and have downloaded and setup MYSQL. The database is there and I have been able to run queries from the command line. I added the lib and include directories. Apparently it is finding some of the files. Here is the code followed by the errors:
Here are the errors:
#define host "appsrvr"
#define username "root"
#define password "nbtis01"
#define database "mysql"
conn = mysql_init(NULL);
unsigned int i;
mysql_query(conn,"SELECT user, host, password FROM user");
res_set = mysql_store_result(conn);
unsigned int numrows = mysql_num_rows(res_set);
while ((row=mysql_fetch_row(res_set)) != NULL)
for (i=0; i<mysql_num_fields(res_set); i++)
printf("%s\n", row[i] != NULL ? row[i]:"NULL");
c:\mysql\include\mysql_com.h(116) : error C2146: syntax error : missing ';' before identifier 'fd'
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::SOCKET' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(116) : error C2501: 'st_net::fd' : missing storage-class or type specifiers
c:\mysql\include\mysql_com.h(180) : error C2065: 'SOCKET' : undeclared identifier
c:\mysql\include\mysql_com.h(180) : error C2146: syntax error : missing ')' before identifier 's'
c:\mysql\include\mysql_com.h(181) : error C2059: syntax error : ')'
c:\Documents and Settings\kgoodrich.SCANNER\My Documents\Visual Studio .NET Projects\SQL Practice\SQL Practice.cpp(25) : warning C4244: 'initializing' : conversion from 'my_ulonglong' to 'unsigned int', possible loss of data
Any ideas why those errors would pop up. I would not think that the syntax would be wrong, because I installed everything from the binary download off of mysql.com. Any ideas would be greatly appreciated.
Thanks a mil,