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

Problem getting data from a string field storing Binary data

Status
Not open for further replies.

mandalorian2

Programmer
Jan 29, 2009
1
US
I am trying to query a field in an older (7.x I believe) SQLBase DB that appears to be storing large amounts of text as null character separated ASCII hex pairs such as the one below:

4100700070006500610072007300200074006F00200062006500200061006E0020006F006C00640020007000610072007400

It seems to be good data I was able to convert this field using a c# encoding function and only reading every other pair to get around the 00 NULL characters this one works out to: "Appears to be an old part"

I am running a query that selects this field for a particular row in C# using the SQLBASEOLEDB.1 provider. However it returns only the first character and then seems to be stopped by the null character so all I get in the case of the above field is "A".

Does anyone know how to get it to ignore the null characters and give me the full text or failing that
I can convert the raw ASCII data easily enough so if I could just get it to return the hex string that would be fine too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top