T
Tim
Hi,
I am trying to do a simple comparison and finding it
quite difficult. I call a SQL Server stored procedure
which returns a Bit as one of the record fields. All I
want to do is see if the Bit being read is a 1. I have
tried this:
if(dbDataReader->get_Item("On") == 1)
but this does not work since get_Item returns an Object*.
So, I searched around some and found the __box function:
if(dbDataReader->get_Item("InGame")->Equals(__box(1)))
This also did not work, it read false everytime. I have
tried casting to an Int32, but it gives me an error. I
can not seem to find an answer to how to do this simple
comparison anywhere. Does anyone know how?
Thank you,
Tim
I am trying to do a simple comparison and finding it
quite difficult. I call a SQL Server stored procedure
which returns a Bit as one of the record fields. All I
want to do is see if the Bit being read is a 1. I have
tried this:
if(dbDataReader->get_Item("On") == 1)
but this does not work since get_Item returns an Object*.
So, I searched around some and found the __box function:
if(dbDataReader->get_Item("InGame")->Equals(__box(1)))
This also did not work, it read false everytime. I have
tried casting to an Int32, but it gives me an error. I
can not seem to find an answer to how to do this simple
comparison anywhere. Does anyone know how?
Thank you,
Tim