Results 1 to 12 of 12
  1. #1
    Join Date
    Sep 2002
    Posts
    456

    Unanswered: DB2 database data in Access

    DB2 v7 fp10.

    Our users are facing problem where they are unable to display certain kind of data through MS Access. The data type in question is BINRAY and it's very inconsistent. Data is displayed correctly for some BINRAY fileds but not for all. Could this be a problem with ODBC driver? Or something else need to be setup?

    Any comment will be great!!!

    dollar

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Did you mean BINARY?

    What specifically are you expecting / seeing?
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Sep 2002
    Posts
    456
    Yes, it should be read BINARY. What we are seeing are varitely of special characters or simply a small box.

    dollar

  4. #4
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by dollar489
    Yes, it should be read BINARY. What we are seeing are varitely of special characters or simply a small box.

    dollar
    Sounds like Access may be trying to translate the binary to characters instead of treating it as binary data?
    --
    Jonathan Petruk
    DB2 Database Consultant

  5. #5
    Join Date
    Sep 2002
    Posts
    456
    Okay, so is there any setting we can change on either end?

    dollar

  6. #6
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by dollar489
    Okay, so is there any setting we can change on either end?

    dollar
    It's going to be an MS-Access setting if it exists, but I haven't been able to track it down on my system.
    --
    Jonathan Petruk
    DB2 Database Consultant

  7. #7
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Arrow Try hexing

    I've had similar end-user comprehension problems

    If the application translates to the Ascii matrix, it will
    treat the each 8 bit (1 byte) group as a Character
    in the codeset - often resulting in special characters.

    One solution is to cast to char(hex()) fields at the backend,
    yielding numbers 0 through F, which most endusers will not
    disagree with and which MSÁccess will surely translate correct.

    HTH
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

  8. #8
    Join Date
    Sep 2002
    Posts
    456
    Kristain,
    When you say backend do you mean Access or DB2? Mainly ours is DB2 database.I would really appreciate if you can point me to some document explaining your solution in detail.

    Thanks.

    dollar

  9. #9
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Backend=´DB2

    I'm suggesting you add a column in the DB2
    database table. Next to your binary column.
    Then update that column using the Hex() values
    of the original column , and let the MSAccess users
    use the new column instead
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

  10. #10
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by Tank
    I'm suggesting you add a column in the DB2
    database table. Next to your binary column.
    Then update that column using the Hex() values
    of the original column , and let the MSAccess users
    use the new column instead
    If you do this you'll probably want some triggers to keep the new column in sync on INSERTs and UPDATEs.

    Access stinks, there should be a way to change the display of Binary data to be more like Db2's, ie. display it in hex... interpreting it as characters is goofy.
    --
    Jonathan Petruk
    DB2 Database Consultant

  11. #11
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Arrow

    Hi Jonathan

    I know - but you figth with the weapons at hand.

    Cheers
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

  12. #12
    Join Date
    Sep 2002
    Posts
    456
    Thank you guys!!! You are great.

    dollar

Posting Permissions

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