Bitwise And
I have the following in a module that works:
Const DB_SYSTEMOBJECT = &H80000002
Public Function IsSystemObject(Flags)
IsSystemObject = (Flags And DB_SYSTEMOBJECT)
End Function
However when I use "Flags And 2147483650" in a query, I don't get the same
results as I do when I say "IsSystemObject(Flags)". Is a way to do the
equivalent of the IsSystemObject Function except in a query directly?
I guess the problem is that the And operator has dual purposes; it is either
a logical or a bitwise operator. So I can probably figure out a way to get
it to be a bitwise operator, but if someone does not mind enlightening me
with their experience, then that will problably help.
Note: Some people will recognize that this is testing the Flags field of the
MSysObjects table to determine if the object is a system object.
|