By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

runtime crash in Release mode but working in Debug mode

P: n/a
Hi,

I am facing an issue with release mode.My code is working fine in debug mode.

The problem is quite strange i am having following code.

while((bRet == DbNextRow(cursor)) != SQL_NO_DATA)
{
}

in release mode when first time control is getting into DbNextRow(cursor)its is working fine but in next iteration of while loop my cursor(i.e. void* memory address) is comming as 0x0000005 which is not the one which i passed in dbnextrow(cursor). I dont know why it is getting changed when control is going inside the function.

Could some one help me on this?
Oct 1 '10 #1
Share this Question
Share on Google+
2 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
MNaybe you could expose a little more code around this snippet.
Oct 1 '10 #2

Expert 100+
P: 2,396
Are sure you want == between bRet and dbNextRow?

As it stands now, bRet is compared to dbNextRow(). The result is 0 or 1 depending on whether they differ or match, respectively. You stay in the loop until SQL_NO_DATA matches that 0 or 1 value.
Oct 1 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.