If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 database data in Access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-04, 11:50
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
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
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 13:23
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 07-15-04, 13:48
dollar489 dollar489 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 07-15-04, 14:01
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 07-15-04, 14:28
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Okay, so is there any setting we can change on either end?

dollar
Reply With Quote
  #6 (permalink)  
Old 07-15-04, 14:50
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 07-16-04, 04:36
Tank Tank is offline
Registered User
 
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
Reply With Quote
  #8 (permalink)  
Old 07-16-04, 08:40
dollar489 dollar489 is offline
Registered User
 
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
Reply With Quote
  #9 (permalink)  
Old 07-16-04, 08:45
Tank Tank is offline
Registered User
 
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
Reply With Quote
  #10 (permalink)  
Old 07-16-04, 09:07
J Petruk J Petruk is offline
Registered User
 
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
Reply With Quote
  #11 (permalink)  
Old 07-16-04, 09:08
Tank Tank is offline
Registered User
 
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
Reply With Quote
  #12 (permalink)  
Old 07-16-04, 10:15
dollar489 dollar489 is offline
Registered User
 
Join Date: Sep 2002
Posts: 456
Thank you guys!!! You are great.

dollar
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On