Reading data from BLOB objects

Frank D. Engel, Jr. fde101 at fjrhome.net
Mon Jul 26 10:47:16 CDT 2004


A bit more info on what I am doing here:

I am trying to execute a query to the effect of:

UPDATE name=value, name=value, ..., logo=:1, name=value WHERE id=anID

Where :1 should be replaced by the binary data from the image, correct?

I tried this:

put image "Logo" into dbImage

revExecuteSQL theDatabase, theQuery, "*bdbImage"


Which failed, and "the result" returned "1".  (A very helpful error 
message, that "1" is!)

I then tried this:

put revQueryDatabaseBLOB(theDatabase, theQuery, "*bdbImage) into x

In this case, "x" returns empty, but the image is not stored into the 
database.

If I try something like:

SELECT * FROM <theTable>

I would expect the column to display an OID number, but instead, it 
shows as blank.

What am I missing here?

On Jul 23, 2004, at 14:51, Frank D. Engel, Jr. wrote:

> Okay, I'm not getting very far here.
>
> Aparently I haven't quite figured out storing BLOBs yet either.
>
> I'm trying to store images on a PostgreSQL server, and retrieve those 
> images.  I am trying to do this with BLOBs.
>
> According to the PostgreSQL docs, I should use a field type of OID for 
> BLOBs.  I did that.
>
> Revolution has the revDatabaseQueryBLOB (mentioned below), and 
> revExecuteSQL, both of which have the *b prefix.
>
> I tried to use these as best as I could figure them out from the docs, 
> but it doesn't work.  If I try a simple SELECT including the BLOB 
> columns, the raw results show an empty field.  I would have expected 
> to see a number, based on what I read from the docs.
>
> There was mention of a bug in using PostgreSQL and BLOBs with rev, 
> which was on the list a while back, but supposedly this should have 
> been fixed by v2.1, and I'm using v2.2.1.
>
> Was the bug actually fixed, and if so, can someone give me examples of 
> actual statements to take data from an image object and store it in a 
> BLOB, and to take the data from a BLOB and put it into an image 
> object?
>
> I'd really appreciate that.
>
> Thank you.
>
> On Jul 20, 2004, at 18:03, Jeanne A. E. DeVoto wrote:
>
>> At 5:16 PM -0400 7/20/2004, Frank D. Engel, Jr. wrote:
>>> I found information in the Revolution help files on how to store 
>>> data in BLOB fields in a database, but how do you actually retrieve 
>>> the data from a BLOB?
>>
>> Check out revDatabaseQueryBLOB.
>> -- 
>> jeanne a. e. devoto ~ revolution at jaedworks.com
>> http://www.jaedworks.com
>>
>
>
>
> ________________________________________________________________
> $0 Web Hosting with up to 120MB web space, 1000 MB Data Transfer
> 10 Personalized POP and Web E-mail Accounts, and much more.
> Get It Now At www.doteasy.com
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



________________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Data Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Get It Now At www.doteasy.com





More information about the use-livecode mailing list