Home All Groups Group Topic Archive Search About
Author
5 Apr 2005 3:20 PM
Agnes
my datafield is "bit" type, I can put 1 or zero into the current item.
e.g bm.current.item("lock") = 1 , (sucesfully)
However, if bm.current.item("lock") = 1 then messagebox.show("warning")
The above statment didn't work . Finally, I solve that by...if
bm.current.item("lock") = true then messagebox.show("warning")
I don't understand.. why (1) cannot be used ???

Author
5 Apr 2005 4:21 PM
Frank Eller
Hi Agnes,

> my datafield is "bit" type, I can put 1 or zero into the current item.
> e.g bm.current.item("lock") = 1 , (sucesfully)
> However, if bm.current.item("lock") = 1 then
> messagebox.show("warning") The above statment didn't work . Finally,
> I solve that by...if bm.current.item("lock") = true then
> messagebox.show("warning") I don't understand.. why (1) cannot be used ???

"BIT" is a booelan field, so the value "1" is mapped to the boolean value
"true" which is a different Datatype in VB.NET.

BTW: If bm.CurrentItem("lock") = true is wrong ... correct would be:

If bm.CurrentItem("lock") Then ...

Regards,

Frank Eller
www.frankeller.de