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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert a binary file to text

Status
Not open for further replies.

NGee

Technical User
Mar 30, 2006
7
US
I have access linked to an Sql Server Database. One table that I have linked has a long binary field called Bits and a field called bits_length. I want to be able to view and use this Bits field. Text is stored in the field. When I use the field in a query it shows long binary in the field. Is there not a simple way to convert these in a calculated field in a query? Like CStr(Bits)- which does not work????? When I do this is show some wild characters.
 
Because it is not stored as text, you'd have to at least know what kind of data it is... Is it unicode, ASCII, an embedded Word document?
 
The best way to know what type of data it is is to know how it was put in...

What program/procedure put it in?
 
I would love for the REAL DBA to tell me something. even though we pay a support fee that is steep!, they don't always answer our questions. They give us the ability to do reports outside the system, but in this case I need to use the field that is stored as binary. We did buy the data dictionary for the program. It says the field is a VARCHAR. I can look at the Stored Procedure that puts the text into the binary field, but cannot find any procedure that extracts it. The reports inside the system does not give us what we need.
 
VARCHAR should come across as text to Access without any trouble. Are you telling us that the data dictionary is wrong? Your original post says that it is a binary data type of sorts.
 
I am saying what the printout says from the book that we purchased. However, it is binary. I see a stored procedure on the sql server that puts the text as binary in the table. When I bring the field into a query, It says long binary in that field. When I try to use it in crystal reports, it displays nothing but an image box with no content. This software is created with Gupta Team Builder. It has the Report Builder, but only gives you templates to work with. I have also tried using the report builder to pull in the table, but does the same as in crystal.
 
I see a stored procedure on the sql server that puts the text as binary in the table."

Either you can gleem enough from the stored procedure to tell what it is putting in or not. Perhaps someone on the SQL Server Programming forum could give you a better idea about what the stored procedure is doing. I am also guessing that if you can see the stored procedure you can verify the datatype of the field through Enterprise Manager.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top