Re: [Gambas-user] Q:how to save a file.png into Postgresql [solved]

2008-09-04 Thread Benoit Minisini
On jeudi 04 septembre 2008, richard terry wrote: > On Wed, 3 Sep 2008 07:51:03 pm Ron_1st wrote: > > Finally solved. > > I did try and try inserting the E in the hint, but put in inside the qotes > and not outside it so this works: > > insert into Insert into clin_consult.temp_image(piccie) values

Re: [Gambas-user] Q:how to save a file.png into Postgresql [solved]

2008-09-03 Thread richard terry
On Wed, 3 Sep 2008 07:51:03 pm Ron_1st wrote: Finally solved. I did try and try inserting the E in the hint, but put in inside the qotes and not outside it so this works: insert into Insert into clin_consult.temp_image(piccie) values (E'\\211PNG\\015\\012\\032\\012\\') Thanks to everyone

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-09-03 Thread Ron_1st
On Wednesday 03 September 2008, richard terry wrote: > On Tue, 2 Sep 2008 09:48:55 pm you wrote: > Ok, that got me a bit further: This is the resultant (failed) insert query . > First try using $$ as the delimiters as per my code gives this and fails: > > insert into > clin_consult.temp_image(pic

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-09-02 Thread richard terry
On Tue, 2 Sep 2008 09:48:55 pm you wrote: Ok, that got me a bit further: This is the resultant (failed) insert query . First try using $$ as the delimiters as per my code gives this and fails: insert into clin_consult.temp_image(piccie)values($$\\211PNG\\015\\012\\032\\012\\000\\000\\000\\015IHDR

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-09-02 Thread Rolf Schmidt
Hello Richard > Dies at the line containing 'Coct' with message: unknown identifier > > but I'm sure this way is good, as I can remember reading something about > this in the postgres doc's but couldn't figure out how to do the > substitution. OK, I thougt it is a Gambas converting function, but

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-31 Thread richard terry
Hi Rof, thanks for taking the time to reply. Dies at the line containing 'Coct' with message: unknown identifier but I'm sure this way is good, as I can remember reading something about this in the postgres doc's but couldn't figure out how to do the substitution. Next step? thanks. Richard

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-31 Thread Benoit Minisini
On dimanche 31 août 2008, Rolf Schmidt wrote: > Hi richard > > > Public sub Save_Image(ImagePath as string) > > > > Dim img As Image > > Dim pictureData As String > > Dim sql As String > > > > img = Image.Load(ImagePath) ' Save temp image as png file > > tempFile = Temp() & ".png" > > img

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-31 Thread Rolf Schmidt
Hi richard > Public sub Save_Image(ImagePath as string) > > Dim img As Image > Dim pictureData As String > Dim sql As String > > img = Image.Load(ImagePath) ' Save temp image as png file > tempFile = Temp() & ".png" > img.Save(tempFile) > > > pictureData = File.Load(tempFile) 'reload

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-31 Thread Benoit Minisini
On dimanche 31 août 2008, richard terry wrote: > snip.. > > > Did you look at the "PictureDatabase" example? It stores images files > > from disk into a database, and retrieves them. > > Thanks, yes I've done that overnight since your suggestion, and now have > this problem: > > My gambas code goes

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-30 Thread richard terry
snip.. > Did you look at the "PictureDatabase" example? It stores images files from > disk into a database, and retrieves them. Thanks, yes I've done that overnight since your suggestion, and now have this problem: My gambas code goes something like this and I've selected the png file to load

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-29 Thread Benoit Minisini
On vendredi 29 août 2008, richard terry wrote: > snip > > > Yet another unhelpful post :-( > > Ah, no not true. > > Will look at the DICOM if/when get around to imaging stuff. Much of the > medical stuff is viewable over the web, and one wouldn't download CT's etc. > > My little drawings as 2K are

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-29 Thread richard terry
snip > Yet another unhelpful post :-( Ah, no not true. Will look at the DICOM if/when get around to imaging stuff. Much of the medical stuff is viewable over the web, and one wouldn't download CT's etc. My little drawings as 2K are miniscule things. My App is currently only a prototype in pro

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-28 Thread Werner
richard terry wrote: > On Fri, 29 Aug 2008 02:24:14 pm Stephen Bungay wrote: > >>Just because something can be done one has to ask the question should >> it be done? >> > Thanks stephen for your reply. > > This is a mission-critical database - its an updated version of my medical > rec

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-28 Thread richard terry
On Fri, 29 Aug 2008 02:24:14 pm Stephen Bungay wrote: >Just because something can be done one has to ask the question should > it be done? Thanks stephen for your reply. This is a mission-critical database - its an updated version of my medical records program which I've used for 10 years, I'

Re: [Gambas-user] Q:how to save a file.png into Postgresql

2008-08-28 Thread Stephen Bungay
Just because something can be done one has to ask the question should it be done? While saving things like PNG or audio files in a database certainly has the appeal of convenience, over the long-haul such a practice may end up coming back to haunt the programmer/designer. File systems a

[Gambas-user] Q:how to save a file.png into Postgresql

2008-08-28 Thread richard terry
I've adapted the IDE icon editor to load my own pictures in my program, draw on them and save the file, but now need to save the result to disk. Two options. 1) Save the changed diagram. 2) or somehow just save the changed bits of the picture - perhaps one can just paint on a transparent overlay