Retrieving Blob data via OLE DB
Posted in 2000
Topics: Installation, Setup & Upgrades, Jobs, Consulting & Announcements
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?
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
Sven O Eklund <sven@scanpub.se> wrote in message
news:Z1Ns4.7604$al3.100866@newsc.telia.net...
> 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?
>
>
>
>