Re: PSQLRestore

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Bob Pawley <rjpawley(at)shaw(dot)ca>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: PSQLRestore
Date: 2011-09-09 08:32:56
Message-ID: 4E69CF38.8000508@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/09/2011 01:25, Bob Pawley wrote:
>
>
> -----Original Message-----
>> From: Raymond O'Donnell
> Sent: Thursday, September 08, 2011 3:23 PM To: Bob Pawley Cc: Adrian
> Klaver ; Postgresql Subject: Re: [GENERAL] PSQLRestore
> On 08/09/2011 23:02, Bob Pawley wrote:
>> The problem seems to be in this code which I am using to transfer from
>> the opendialogue to PSQLRestore.
>>
>> FileRestore := OpenDialog1.FileName;
>> PSQLRestore1.RestoreFromFile(FileRestore, ' ');
>>
>> I'm not sure what string is expected.
>
> Hello Bob,
>
> According to the docs, the second argument should either be a TStrings
> object, into which log messages are placed, or else the name of a file
> where the log output can be written.
>
> Ray.
>
> Hi Ray
>
> Is there any chance you could send me a short example of what that means.

Hello Bob,

This is off the top of my head - I haven't used that component (yet)
myself, and haven't tested the following, but at a guess it would be
something like this:

EITHER:

var
LogMessages: TStringList;
begin
....
LogMessages := TStringList.Create;
....
PSQLRestore1.RestoreFromFile(FileRestore, LogMessages);

... and then later you could display the contents of LogMessages, if you
need to.

OR:

PSQLRestore1.RestoreFromFile(FileRestore, 'c:\logfile.txt');

I hope this helps.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henry Drexler 2011-09-09 14:42:11 integer instead of 'double precision'?
Previous Message Steve Crawford 2011-09-09 00:28:46 Re: 8.4 -> 9.0 upgrade difficulties