Bool data type issue
-
-
Hi, I am getting boolean value from store procedure.When flag is set, it fill value 255 otherwise 0. It should be 1/0. When i tried to declared varaible type bool no data is coming and it is showing garbage.Can you please help me. Thank :sigh:
simple: suppose c is what you get from the stored proc and b is the boolean you want. just do this: b = c & 1; cast (c & 1) to bool if needed
-
Hi, I am getting boolean value from store procedure.When flag is set, it fill value 255 otherwise 0. It should be 1/0. When i tried to declared varaible type bool no data is coming and it is showing garbage.Can you please help me. Thank :sigh:
I believe this is the correct result as VARIANT_TRUE is defined as -1, VARIANT_FALSE is 0. What database are you using? John
-
I believe this is the correct result as VARIANT_TRUE is defined as -1, VARIANT_FALSE is 0. What database are you using? John