Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interpreting VarBinary information

Status
Not open for further replies.

cdck

Programmer
Joined
Nov 25, 2003
Messages
281
Location
US
Over a year ago, I was presented with a problem regarding the need to pull data from a text field in a table that I did not generate. Users here at Tek-Tips helped me to determine that the field is apparently a CLOB, and one user gave me a tip that helped me to pull the data out as VarBinary. Then suddenly another project blew up and I was pulled for this duration. Now, after all this time, I am asked to return to this issue with a pressing deadline.

The previous thread is thread183-1525073.

I wrote a query as suggested by gmmastros to convert the data to VarBinary, but had no luck recognizing a pattern of any sort or interpreting what I got. With the result set to 50 characters, here's an example of what is returned:
[tt]0x4D0F4C41444953544200000000410000000000000000000000000003000000000000060002004C4144495354420000000043
[/tt]
Somehow, someone stored a list of accounts and percentages in this field, which i need to pull back out to use for math. I'm at a loss as to how I can do this.

I've been reading over information on BLOBs and CLOBs, and it's only served to confuse me, because most of it seems to be focused on telling you how to create them and when, and how they work. I can't find anything to help me puzzle out how to pull data from one when you do not know what format the original data was in.

Any suggestions? If this is a lost cause, knowing that would be very helpful, as well.

Cheryl dc Kern
 
Could you get it back to your Front End and save that string as as regular Text file. It it you maybe will see the pattern.
I see you have many NULLs in it (almost every 00 is NULL)

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
BTW the example value gives me this:
[tt]
M LADISTB A LADISTB C
[tt]
Where all spaces represents non-printable data like CHR(15) or NULL.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
I'm not sure how to write the field to a text file. If I open the table in Enterprise Manager, I can see only M}{LADISTB in every row, where }{ is actually one character that looks like those two characters overlapped - an odd star. If I click on one of those fields, more data shows up seperated by a lot of spaces, but when I try to copy the contents of one field, all I can paste is MLADISTB.

The table name is glauto, the field is fmarray. Can you suggest how I can output that fmarray to a text file?

Cheryl dc Kern
 
Wow - how did you interpret that so quickly? I admit to being impressed.

Cheryl dc Kern
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top