Mike Baranski wrote:
> Sorry about the previous one, that was a mistake.
> I have the following code to insert a blob into an access OLE object field:
I am not sure if using SQL is the appropriate way to update such object
Anyway, to make this work, such object must be of ODBC type
Metabase can create tables with BLOB fields properly declared. You may
want to try the driver test script to see what it does and how it shows
in access. Look in lob_test.schema to see how you can define a schema
with LOB fields so Metabase manager class can create one for your needs.
> if(($prepared_query=MetabasePrepareQuery($database,"UPDATE incident_blob SET
> data_blob=?, description='new'")))
> echo "Error 1 (CreateLOB): $error\n";
> echo "Error 2 (Prepare): $error\n";
> I can connect and query the database otherwise, and it works fine. The
> problem is with the Blobs, that update statement is not getting run. There's
> only 1 row in the table, but the description and ole object do not get
> updated. If I switch the driver to use mysql as opposed to odbc, it works
> fine on an identical table (on linux, not windows). Any ideas?
Did you verify that MetabaseExecuteQuery call above succeeds? If it does
not succeed, what is the error message that is returned?
> Mike B.
> On Wednesday 26 December 2001 02:49 pm, Manuel Lemos wrote:
> > Hello,
> > Mike Baranski wrote:
> > > Hi, I'm trying to store a binary file in an access database, I'm using an
> > > ole type, and I think that it's getting inserted OK. My problem is that
> > > I don't know how to pull it out... How do you select the stuff that's in
> > > an ole object out of the database and display it, a jpg, for example. I
> > > can't even get the raw data. I've tried converting it to base 16 and
> > > inserting it, but I still can't pull it out. I know how to do this in
> > > mysql, so posting that won't help. I need to know how to do this with
> > > access.
> > If you are using ODBC, you may want to try Metabase because it supports
> > BLOB fields with any ODBC driver. Metabase is Open Source and is freely
> > available here.
> > http://phpclasses.UpperDesign.com/browse.html/package/20
> > Regards,
> > Manuel Lemos
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]