PSQLRestore

Поиск
Список
Период
Сортировка
Искать

PSQLRestore

От:
"Bob Pawley" <rjpawley@shaw.ca>
Дата:
Hi
 
I’m having problems making PostgreDAC’s PSQLRestore work without an access violation.
 
Could someone please point me to an example code that I can check?
 
(My PSQLDump is working well, so I am using a valid restore file.)
 
Bob

Re: PSQLRestore

От:
Adrian Klaver <adrian.klaver@gmail.com>
Дата:
On 09/08/2011 09:09 AM, Bob Pawley wrote:
> Hi
> I’m having problems making PostgreDAC’s PSQLRestore work without an
> access violation.

The exact error message is?

> Could someone please point me to an example code that I can check?
> (My PSQLDump is working well, so I am using a valid restore file.)

But are you restoring as a valid user?

> Bob


-- 
Adrian Klaver
adrian.klaver@gmail.com

Re: PSQLRestore

От:
"Bob Pawley" <rjpawley@shaw.ca>
Дата:


-----Original Message----- 
From: Adrian Klaver
Sent: Thursday, September 08, 2011 1:41 PM
To: Bob Pawley
Cc: Postgresql
Subject: Re: [GENERAL] PSQLRestore

On 09/08/2011 09:09 AM, Bob Pawley wrote:
> Hi
> I’m having problems making PostgreDAC’s PSQLRestore work without an
> access violation.

The exact error message is?

Access violation at adress 74FF8E0F in module 'msvcrt.dll'. Write os address 
004F8574.

> Could someone please point me to an example code that I can check?
> (My PSQLDump is working well, so I am using a valid restore file.)

But are you restoring as a valid user?

I'm not sure.

The properties only refer to a superuser which doesn't appear to be 
applicable for a simple restore.

I am going through a PSQLDatabase connection in my normal manner.

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.

Bob

> Bob


-- 
Adrian Klaver
adrian.klaver@gmail.com 

Re: PSQLRestore

От:
Raymond O'Donnell <rod@iol.ie>
Дата:
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.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: PSQLRestore

От:
"Bob Pawley" <rjpawley@shaw.ca>
Дата:


-----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.

If so, much appreciated.

Bob



-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

Re: PSQLRestore

От:
Raymond O'Donnell <rod@iol.ie>
Дата:
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@iol.ie
FAQ