Forum: Ruby lo_export problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D97d7978720612c63dc899ad4b25b5b3?d=identicon&s=25 incoroneta (Guest)
on 2007-07-04 12:46

i'm trying to store a picture from the DB to the filesystem.
i've used the function lo_export like that:

res = conn.query("SELECT nome,physical_image FROM images;")




there're not errors, the script run...
The problem is that no files are created and i don't know why.
Can somebody help me??

thanks in advance...
1c0cd550766a3ee3e4a9c495926e4603?d=identicon&s=25 John Joyce (Guest)
on 2007-07-04 17:08
(Received via mailing list)
On Jul 4, 2007, at 5:48 AM, incoroneta wrote:

>   conn.lo_export(res[i][1].to_i,'/home/andrea/senior/public/images/#
> Can somebody help me??
> thanks in advance...
> --
> Posted via
Check out the IO and File libraries.
ri File
ri IO
also, in Ruby it's a good idea to put spaces before and after
i += 1
This topic is locked and can not be replied to.