Please allow me to preface this post with an apology. I'm not sure where the below issue is derived from, (the difference in operating systems, a MySQL problem, a C problem, etc...), so if this post is in the wrong topic, again, my apologies.
...continuing on...
System Setup 1:
Microsoft Windows XP Professional, SP3, 32 bit.
MySQL 5.1.47
System Setup 2:
Microsoft Windows Server 2008 Web Edition, SP3, 32 bit.
MySQL 5.1.47
Everything on System Setup 2 is identical to System Setup 1 except for the operating system.
On the System Setup 1, the following C code has been working flawlessly. In other words, "bot", "top", "ls", and "rm" all populate with the correct data.
Code:MySQL my; char szQueryText[2500]; MYSQL_RES *My_result = NULL; int bot, top, ls, rm; snprintf(szQueryText, sizeof(szQueryText), "SELECT roomRangeFrom, roomRangeTo, lifespan, resetMode FROM zData WHERE zone= 10"); My_result = MySQL__query(szQueryText); if (my.Query(szQueryText) > 0) { my.NextRow(); bot = atoi(my.GetData("roomRangeFrom")); top = atoi(my.GetData("roomRangeTo")); ls = atoi(my.GetData("lifespan")); rm = atoi(my.GetData("resetMode")); }
However, on System Setup 2, ONLY "bot" populates with the correct data.
Let's assume that the database holds the following values for each of the above mentioned variables:
bot: 190
top: 250
ls: 8
rm: 17
On System Setup 1, the code would produce:
bot: 190
top: 250
ls: 8
rm: 17
However, on System Setup 2, the code would produce:
bot: 190
top: 190
ls: 190
rm: 190
Conclusion: I'm completely baffled as to what's going on here. Is it an operating system issue? A MySQL issue? Something else? Any insight to this hair-pulling circumstance would be greatly appreciated.
Thank you.



LinkBack URL
About LinkBacks



