Convert LONG (not RAW) to BLOB?

From: Spiggy Topes <>
Date: Wed, 30 Jul 2008 15:16:37 -0700 (PDT)
Message-ID: <>

I have an Oracle database containing several tables with LONGs - not LONG RAW, just LONG. These tables were accessed by a VB application using ADO and Microsoft's MSDATASHAPE provider. It's been perfectly happily socking away and retrieving binary data to/from those LONGs for several years now - archived Word documents, Outlook message files and so forth.

Recently, I found out what happens when language settings at the server and the desktop are different; character translation eats all the binary data leaving useless mush.

So it behooves me to replace all the LONGs with BLOBs, before disaster strikes.

Trouble is, I can't find a way of converting that doesn't require reading each record using MSDATASHAPE as a LONG and writing it using ORAOLEDB as a BLOB - the MS provider doesn't do BLOBs. All the simple SQL suggestions I've found so far don't work, as they either won't allow for conversion of a field defined as LONG to any binary format, or as soon as they hit non-character data they die.

Anyone have a workable method to get around this? Received on Wed Jul 30 2008 - 17:16:37 CDT

Original text of this message