INSERT ASCII Character 0

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi all, I'm am trying to insert some encrypted text into a record using the
INSERT statement. The problem is, the encrypted text may contain ASCII
character 0. Access doesn't like this much. Is there a way to escape this
character to get it to insert (or update) properly? Thanks for your help!!

Eric
 
if it is not to long (127 chars ... ) you can convert it to its numerical
value & store that (in a memo field will always work)

Function str2Hex(ByVal code As String) As String
Dim i As Long
Dim ret As String

For i = 1 To Len(code)
ret = ret & Format(Hex(Asc(Mid(code, i, 1))), "00")
Next
str2Hex = ret
End Function

The other way I leave as an exercise

hth
Pieter
 
Back
Top