From: John Joyce Date: 2007-07-05T00:07:43+09:00 Subject: Re: lo_export problem On Jul 4, 2007, at 5:48 AM, incoroneta wrote: > Hi, > > 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;") > > i=0 > while(res[i]!=nil) > conn.lo_export(res[i][1].to_i,'/home/andrea/senior/public/images/# > {res[i][0]}.jpg') > i+=1 > > end > > > conn.close()) > > 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... > > -- > Posted via http://www.ruby-forum.com/. > 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 operators... i += 1