ADO Programming

Moderators: None (Apply to moderate this forum)
Number of threads: 87
Number of posts: 225

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Extracting binary Data from numeric Field Posted by Aleinei on 15 Mar 2010 at 6:41 AM
I am using a field called [Status] to store binary data in it, i.e. 1,2,4,8,16,32,64,128 and so on
and then I need to check if a binay value is included with that fields value, i.e. if the field value = 14, then it should contain the binary values 2,4, and 8
I have done this with MS SQL Server and use the bitwise and [&]
"Select Id, IDate, [Status] from Invoices where ([Status] & 4) = 4"
This will retreive all the records that has the field [Status] containing the [4] value in it, that is any record with the [Status] field value = 4 or 5 or 12, or 14 and so on
but I need a similar to it in ADO or Access
Thank you so much
Gameel Al-Einei
Cairo, Egypt




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.