Produce HEX and ASCII in query results or in a visual basic variable

We have a need to produce hex and ascii in the same results field.

The field with data will be bound to a 2D barcode (the square ones you see everywhere now). The format of the data is to look like this:

[)><RS>06<GS>xyz<RS><EOT>

The <RS>, <GS>, and <EOT> all need to be hex values as follows:

<RS> = Hex 1E, Decimal 30
<GS> = Hex 1D, Decimal 29
<EOT> = Hex 04, Decimal 04

When I run my Access query as follows:

BarCode: "[)>"&Hex(30)&"06"&Hex(29)&"xyz"&Hex(30)&""&Hex(04)& ""

It produces the following:

[)>1E061Dxyz1E04

So, it just converts it to ASCII; however, when I go to scan it, it actually reads that information also. I need the 1E, 1D, and 04 to actually be scanned as HEX for the validation to occur for our client.

Is it possible using an Access query to return these desired results? If not, I will have to look atother piece of software to produce the bar code labels.
dzirkelbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
So to be clear, you have this:
[)><RS>06<GS>xyz<RS><EOT>

..and you want this?:
[)><1E>06<1D>xyz<1E><04>
0
dzirkelbAuthor Commented:
Part of the problem is the explanation.

Where it says <rs>, or <1E>, they are the same thing, description of what is needed for hex.  I don't want to show a hex value in ASCII format, hence the 1E, I want it to actually be a hex value, not a hex value converted to string.

So, it won't actually show the <rs> or the <1E> in a program because hex isn't rendered visible / readable, it is simply translated by the machine seeing it.
0
Jeffrey CoachmanMIS LiasonCommented:
Then I am not sure that this can be done easily in Access.

I know there are ways to store BLOB ((B)inary (L)arge (O)(B)ject) data in Access, but not sure if this would include pure HEX.

So lets see what other experts may post...
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

dzirkelbAuthor Commented:
I am leaning towards agreeing with you, and ya, a solution is to export it to a text file with binary embedded with the regular string, then link it to a database field, then query that, but meh, no thanks :)
0
IrogSintaCommented:
hex isn't rendered visible / readable
Is this similar to a UPS Maxicode barcode?  If so, then I believe you mean that these are non-printable ASCII characters.  
Try this:
BarCode: "[)>" & Chr(30) & "06" & Chr(29) & "xyz" & Chr(30) &"" & Chr(04)
0
IrogSintaCommented:
Any luck with that last suggestion?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dzirkelbAuthor Commented:
No luck, we are just purchasing new software that does it easier, thanks for the suggestions.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.