Online sample of a HexString conversion texts and files for SQL commands.

      This online sample demonstrates functionality of a HexString property, ByteArray class (or FormField.HexString) and Huge asp file upload. You can convert binary file to a SQL command to insert/update binary or image SQL field.
      The Form.SizeLimit is 1000000bytes. Please, do not post more source data.

You can create an SQL command to insert data:
 Insert into ()
  values ()

Or update binary column in database:
  Set =

  Output type:
Plain SQL command
Plain HexString
WSH VBS script, connection string:
(Access, MDB): Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\files.mdb
(MS SQL): Provider=SQLOLEDB;Data Source=Server name;

  Output data:
output to a textbox (as a string)
export to a text file, filename:
      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.

          Another online samples (utilities, converting, upload)

          On-line base64 decoder and encoder - let's you convert text data and files from/to a Base64 string.
          Punycode/IDN decoder and encoder - online conversion between unicode (utf-8), punycode and IDNs (Internationalized Domain Names)
          URL Encoder, escape with charset conversion
          URL Decoder, unescape with charset conversion
          Online binary file to SQL field (HexString or base16) - let's you create an SQL statement to insert/update binary or a text file to a SQL database field. You can also create whole WSH (VBScript) to do the action.
          Online Codepage & Charset text and file converter - let's you convert text, html and files between many code pages.
          Live upload with progress sample - simple upload of files to ASP with progress bar.
          Live upload with image preview - Upload with many additional features: image preview, size preview and file type checking (before upload), server-side checking for file type, file contents, file size and upload size and more.
          IAF password recovery - Recovery passwords from your IAF File.
          Online IAF file generator - Create email account configuration file for Outlook express online.
          Online IAF decoder - Decode IAF configuration files online.
          Gmail pop and smtp configuration generator - Outlook config for Gmail.
          quoted-printable encoder online sample.
          quoted-printable decoder online sample.

          Related links

          ByteArray.HexString property, FormField.HexString property.
          ScriptUtilities ByteArray class
          HugeASP upload FormField class
          Upload - Using a HexString property and Insert statement sample.
          Upload - large files to MS SQL Server using a HexString property and UPDATETEXT SQL statement sample.
          Read and write SQL image data, store binary file to sql table article.
          Upload - to database, or not to database? article.
          Download trial version of ScriptUtilities 800kB .exe setup, evaluation version with help and samples.
          RFC 3548 - The Base16, Base32, and Base64 Data Encodings.

    © 1996 - 2024 Antonin Foller, Motobit Software | About, Contacts | LinkedIn