Just use a decent backup, and not a generated sql-script.

On Tue, 2007-05-15 at 17:26 +0300, ik wrote:
> Many of the database backup and restore tools backup the data as sql dump.
> The binary image can not be restored "as-is" in that sql dump.
> I had a problem once that an hardrive collapse, and when I tried to
> restore the sql dump, it was unable to restore it because of that. So
> since then I learned from expirence :)
> 
> Ido
> 
> On 5/15/07, Sergio Samayoa <[EMAIL PROTECTED]> wrote:
> > Why text?
> >
> > Database's software must provide backup & restore utilities which can handle
> > binary data.
> >
> > -----Mensaje original-----
> > De: ik [mailto:[EMAIL PROTECTED]
> > Enviado el: Martes, 15 de Mayo de 2007 07:32 a.m.
> > Para: lazarus@miraclec.com
> > Asunto: Re: [lazarus] Image from SQL
> >
> > Hi,
> >
> > You are looking for blob. I recommand you to store the image a base64
> > on a text blob rathet then a binary blob.
> > The reason is simple.. backup and restore of data.
> >
> > Ido
> >
> > On 5/15/07, A.J. Venter <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > > I would like to be able to store images inside a postgresql table
> > > (inserted WITH a lazarus app) then retrieve them again and display
> > > them from inside a different lazarus app.
> > > XPM would do, but jpg would be ideal.
> > >
> > > I am guessing the process would be something like this:
> > >
> > > Inserting an image:
> > > Use a TImageSelect dialog to select the filename
> > > Load the file into a TStringList;
> > > SQL Insert TStringlist.Strings
> > > (Easiest way to get from file to string)
> > > What would be the best SQL type to store it as ? BLOB ?
> > >
> > > Retrieving:
> > > SQL Select Image
> > > Read the result into a string
> > > Store the string into a Tmemorystream
> > > TImage.LoadFromSTream(TMemoryStream)
> > >
> > > This brings up a few questions though:
> > > 1) How can I store a string into a TMemoryStream ? I know that
> > > TStringList has a loadFromStream method - but how d I go the other way
> > > around ?
> > >
> > > Is there a BETTER way I should using ?
> > >
> > > A.J.
> > >
> > > --
> > > A.J. Venter
> > > CEO - OutKast Solutions C.C.
> > > http://www.outkastsolutions.co.za
> > > Cell: +27 83 455 9978
> > > Fax: +27 21 413 2800
> > > Office: +27 21 591 6766
> > >
> > > _________________________________________________________________
> > >      To unsubscribe: mail [EMAIL PROTECTED] with
> > >                 "unsubscribe" as the Subject
> > >    archives at http://www.lazarus.freepascal.org/mailarchives
> > >
> >
> >
> > --
> > http://ik.homelinux.org/
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> >
> 
> 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to