You can use this script to do:
Insert a binary or text file to a field of a SQL table using binary hex conversion.
Convert a file to a Hex String (base16, RFC3548)
Create VBScript (VBA) to insert/update database fields
This script is primary designed to insert/update binary columns (binary, varbinary, image, MDB Memo, MDB OLE Object, ...), but you can use it for any other type of column: char, varchar, text, nchar, nvarchar, ntext and others.
This online sample Hex String encoder (or base16 encoder) uses a special binary-to-HexString algorithm written for the
ByteArray class.
The HexString conversion algorithm is written in ASM in ATL COM C++ project and works with binary (VT_ARRAY | VT_UI1) OLE data.
Source code of the coding algorithm is available within
distribution license of a
ScriptUtilities library.
The
ByteArray class was primary designed
to work with ASP and VBScript, but you can use it with any other language working with COM (ActiveX, OLE) objects,
such is VBA (VBA5, VBA6, Word, Excel, MS Access), VBScript and JScript in windows scripting host
(.wsh, .chm or .hta applications, Outlook or echange server-side scripts), VB.Net, C# or j# in ASP.Net and others.