Using classic ASP I am trying to send a binary stream to PG. The streams can have some size to them, as in up to 5 megs ish. They will be various items such as images, Word docs, Excel spreadsheets or other.

I tried putting these into LOs, but that field type doesn't seem to be accessible from ASP. I've tryied putting them into ByteA fields, but converting them to HEX takes a while (over 2 minutes for a 216k stream).

The best is if I could run something like:

tmpStr = streamObj.read (500)
conObj.execute "INSERT INTO someTable (someByteA) VALUES (encode ('" & tmpStr & "');"

However the portion of code in red above generates a type mismatch error. This is because the tmpStr variable contains binary data whereas the rest of the string is regular text data.

Does any one have better ideas?