Retrieving Blob data via OLE DB

Retrieving Blob data via OLE DB

Post by Sven O Eklun » Sun, 31 Dec 1899 09:00:00



I have just upgraded to Informix 7.30 on my Unix server and I am accessing
the database from Visual Basic 6 via a newly installed OLE DB Provider
version (SDK ver. 2.3) on the Windows 98 client.

I have no problem accessing rows and columns, accept for those containing
BLOB data. This is the SQL-string information I get from the documentation
on how to retrieve BLOB data:

sSql = "SELECT LOTOFILE(mybytecol::blob, 'fname', 'client') " _
   & "From mytab Where pkey = 12345"
I have tried hundreds of different ways to write this syntax and I am still
failing. This is just one of these failures:
sSql = "SELECT LOTOFILE(app_data_image, 'c:\temp\resume', 'alfa') " _
   & "From app_data_table Where data_id=29445"

rstInformix.Open sSql, cnADO, adOpenForwardOnly, adLockReadOnly
'alfa' is the name of my PC-client.
I get either of these two error messages: "Syntax error" or "Routine
(lotofile) can not be resolved." What is going on?

 
 
 

Retrieving Blob data via OLE DB

Post by Leopold The Ca » Sun, 31 Dec 1899 09:00:00


Sven,

lotofile() works with smartblobs. 7.x does not have smartblobs. It has plain
old blobs that you should be able to fetch with just

select app_data_image from app_data_table where data_id = 29445

By the way, the currently shipping version of the provider is 2.1 (Client
SDK 2.4, fall 1999)

Leopold



Quote:> I have just upgraded to Informix 7.30 on my Unix server and I am accessing
> the database from Visual Basic 6 via a newly installed OLE DB Provider
> version (SDK ver. 2.3) on the Windows 98 client.

> I have no problem accessing rows and columns, accept for those containing
> BLOB data. This is the SQL-string information I get from the documentation
> on how to retrieve BLOB data:

> sSql = "SELECT LOTOFILE(mybytecol::blob, 'fname', 'client') " _
>    & "From mytab Where pkey = 12345"
> I have tried hundreds of different ways to write this syntax and I am
still
> failing. This is just one of these failures:
> sSql = "SELECT LOTOFILE(app_data_image, 'c:\temp\resume', 'alfa') " _
>    & "From app_data_table Where data_id=29445"

> rstInformix.Open sSql, cnADO, adOpenForwardOnly, adLockReadOnly
> 'alfa' is the name of my PC-client.
> I get either of these two error messages: "Syntax error" or "Routine
> (lotofile) can not be resolved." What is going on?


 
 
 

1. Problems retrieving TEXT columns via OLE DB

Is there anything special that you must do to get data from a column of type
TEXT in SQL server 7 via ASP / OLE DB?  When I use char or varchar as the
datatype, everything works fine, but if I change to TEXT, it returns a NULL
value.  I'm creating a standard recordset object, and referencing the text
field with the following line:

Recordset1.Fields.Item("CASE HISTORY").Value

Varchar was ok until recently, but these CASE HISTORY records need to be
more than 8000 characters.  Thanks in advance for any help.

Justin

2. Share/freeware simple relational databse

3. Using BLOBs (Byte) in VB6 via OLE DB to IDS 7.30

4. A Comparison between OpenRoad and Other Gui Products.......

5. How to retrieve Blob data via ODBC

6. 6.5 Performance Problem Updating a Table

7. VB30: Accessing OLE-field in ACCESS-DB via OLE-VBX

8. Interesting web sites - web-related tools

9. OLE DB: retrieving NUMERIC field from an Oracle 8.1.5 DB

10. Edit/Store/Retrieve/Submit SQL Server Blobs via XML

11. Retrieving BLOBs from ADABAS D via JDBC

12. problems retrieving XML using ATL OLE DB