Results 1 to 3 of 3

Thread: Binary data and Access listbox

  1. #1
    Join Date
    Aug 2003
    Location
    In a galaxy far, far away...
    Posts
    28

    Binary data and Access listbox

    Gents,

    Can someone tell me how to handle binary data in Access 2000?

    I mean when I make a listbox or combo box I'd like to narrow the items listd with the recordsource property by entering a simple select statement. The only problem is that the linked table (MS Sql 2000) contains a binary column and this column should be the filter.
    E.g. I need the records with the 3rd bit set, so the query shold be the next: "select column from table where binary_column and 4 = 4" but it does not work.

    Please advise.

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Use & for AND operation in SQL.


    select binary_column & 4 from table1

  3. #3
    Join Date
    Aug 2003
    Location
    In a galaxy far, far away...
    Posts
    28
    Originally posted by MAK
    Use & for AND operation in SQL.


    select binary_column & 4 from table1
    Well...I've already tried this but doesn't work - at least for me.
    If I use "&" instead of "AND" in MS Access query it simply adds the two expressions as string. In VBA the recordset always contains only the first record of the table if I use "AND". With the "&" operator the system stops with an error message telling me that the field and the operation expresiion has different type. (here's a sapmle query: select description from dbo_FaultDescriptor where location & 2 = 2. Column location is the binary data. Result: Type mismatch)

Posting Permissions

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