Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Large Bitmask Operation

Reply
Thread Tools

Large Bitmask Operation

 
 
Remy
Guest
Posts: n/a
 
      05-22-2009
I use bitmasks in tandem with MS SQL Server, used for access permissions but
also option lists.

I have used this for many years happily. I now have the situation were an
option list which was supposed to contain a few items (easily enumerated)
will potentially have to hold 100s of items.

My issue is that VBScript will not be able to operate on these large numbers
as they will be beyond any numeric type inherent in VBScript. I could use a
binary varchar in SQL to store values but have the problem of using bitwise
comparision in VBScript.

I'm sure there must be a way of checking sizes and cutting up the binary
into manageable chunks but I have no idea even how to attempt this.

I've read some stuff on SQL managing this type of thing but I need a VBS
solution.

All help is appreciated.

 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      05-22-2009
Remy wrote:
> I use bitmasks in tandem with MS SQL Server, used for access
> permissions but also option lists.
>
> I have used this for many years happily. I now have the situation
> were an option list which was supposed to contain a few items (easily
> enumerated) will potentially have to hold 100s of items.
>
> My issue is that VBScript will not be able to operate on these large
> numbers as they will be beyond any numeric type inherent in VBScript.
> I could use a binary varchar in SQL to store values but have the
> problem of using bitwise comparision in VBScript.
>
> I'm sure there must be a way of checking sizes and cutting up the
> binary into manageable chunks but I have no idea even how to attempt
> this.
>
> I've read some stuff on SQL managing this type of thing but I need a
> VBS solution.
>

When you get to this point, you really need to move away from bitmasks and
use your relational database to do what it's supposed to do. Filtering by
bitmask is never efficient since every row has to be read (you cannot use a
bitwise comparison to create an index). You will need to create a table to
hold the option values and keys, and another table to link the users to the
options.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Bitmask problem Patrick C Programming 4 07-19-2007 04:49 AM
The Hack of bitmask used as Predicate Parameters Xah Lee Java 0 04-23-2007 10:53 AM
Schema representation of a "bitmask" type? Andrey Brozhko XML 1 12-10-2004 05:12 PM
Bitmask & Graphics Question Rod Nibbe Java 2 10-26-2004 03:56 PM
Bitmask representation of integers =?iso-8859-9?Q?Tongu=E7?= Yumruk Python 3 10-08-2003 02:50 PM



Advertisments