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

True or 1 ?

P: n/a
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 ???
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.