Results 1 to 3 of 3

Thread: Need to perform bitwise query using DAO

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    2

    Question Need to perform bitwise query using DAO

    I am using an Access 2000 db and have a set of boolean values that are bit packed. This scheme works fine and I can get around the DAO limitations inside of Access, but I am having a hard time figuring out how to do it from inside VB. The query wolud look something like:

    Select * from table where (fieldname bitwise-equal value);

    Any suggestions?


  2. #2
    DerFarm
    Guest
    by bit-packed I assume you mean a string similiar to: "0011001" where each character represents the presence or absence of some condition?

    if so, you can use the mid function:

    where mid$([fieldname],position,1)="1"

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Posts
    2
    No. I mean that each bit in the field value represents a true or false position. Therefore, if I have eight boolean parameters the state of the parameters is represented by the bit value in a single byte of information. For example,

    T F T T F T F FT ==> 10110101 in the byte which gives it a value of 179

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width