pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <kobruleht2@hot.ee>
To: pgsql-odbc@postgresql.org
Subject: Re: examples VFP with Postgresql
Date: Thu, 8 Mar 2007 19:19:53 +0200
Message-ID: <espgk3$2r89$1@news.hub.org> (raw)
References: <8398dc6d0703080426hc9907det376df423e8756a23@mail.gmail.com>
	<BAY106-F28EC6A8A9B6424BA2CACA5C0790@phx.gbl>

For backup, use


LPARAMETERS cFn, cserver,cuser,nport,cdatabase

* Using Ed Rauh class available from Universal thread downloads

LOCAL orun as api_apprun OF api_apprun.vcx

EXTERNAL CLASS api_apprun.vcx

LOCAL cAppl

cAppl= 'pg_dump.exe'

LOCAL cmdline

cmdline = '"'+m.cAppl + [" -ibv -Z3 -f "]+m.cFn+ ;

[" -Fc -h ]+cserver+ ;

[ -U ]+user+ ;

[ -p ]+TRANSFORM(nPort)+ ;

' '+ cdatabase

text to lcBatText textmerge noshow

@echo off

@set pgpassword=<<this.cpassword>>

@echo <<cmdline>> >backuplog.txt

@echo <<"Creating backup "+m.cFN>>

@echo <<"Wait ">>

<<cmdline>> 2>>backuplog.txt

echo %errorlevel% >errorlevel.txt

ENDTEXT

lcHere=fullpath(set("directory"))

lcBat=fullpath("tmp.bat")

strtofile(lcBatText, lcBat)

orun=Newobject('api_apprun','api_apprun.vcx', '', lcbat, lcHere)

IF !orun.launchappandwait()

messagebox( m.cAppl + ' ; ' + ;

"Cannot run" )

DELETE FILE (lcbat)

DELETE FILE backuplog.txt

DELETE FILE errorlevel.txt

RETURN .f.

ENDIF

IF orun.CheckProcessexitcode()#0

DELETE FILE (m.cFN)

messagebox( +' Backup process error ; '+ ;

TRANSFORM(orun.checkprocessexitcode(),'@0' ) )

MODIFY FILE backuplog.txt

DELETE FILE backuplog.txt

DELETE FILE errorlevel.txt

DELETE FILE (lcbat)

RETURN .f.

ENDIF



nErrorLevel=val(filetostr("errorlevel.txt"))

IF nErrorLevel#0

DELETE FILE (m.cFN)

okget( " pgdup error code " + ;

filetostr("errorlevel.txt"), m.cFN, .t. )

MODIFY FILE backuplog.txt

DELETE FILE backuplog.txt

DELETE FILE errorlevel.txt

DELETE FILE (lcbat)

RETURN .f.

ENDIF

DELETE FILE (lcbat)

IF !file(m.cFN)

MODIFY FILE backuplog.txt

DELETE FILE backuplog.txt

DELETE FILE errorlevel.txt

RETURN .f.

ENDIF



""ionut ichim"" <ionutichim@hotmail.com> wrote in message
news:BAY106-F28EC6A8A9B6424BA2CACA5C0790@phx.gbl...
> Thanks for answer.
> I'm interest how can i work with pg +VFP ... connections,sored
> procedures,backup ,etc
>  Some links for simple examples, to test.
>
>
>
>
>
>>From: "Alejandro D. Burne" <alejandro.dburne@gmail.com>
>>To: pgsql-odbc@postgresql.org
>>Subject: Re: [ODBC] examples VFP with Postgresql
>>Date: Thu, 8 Mar 2007 09:26:10 -0300
>>
>>2007/3/7, ionut ichim <ionutichim@hotmail.com>:
>>>I'm looking for some  examples VFP with Postgresql ?
>>>thanks.
>>
>>I'm using vfp with postgresql, what kind of examples?
>>
>>Alejandro
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 1: if posting/reading through Usenet, please send an appropriate
>>       subscribe-nomail command to majordomo@postgresql.org so that your
>>       message can get through to the mailing list cleanly
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org
>






view thread (6+ messages)

Message-ID: <espgk3$2r89$1@news.hub.org>
Permalink:  ../espgk3$2r89$1@news.hub.org/
Also on:    postgresql.org/message-id/espgk3$2r89$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: kobruleht2@hot.ee
  Subject: Re: examples VFP with Postgresql
  In-Reply-To: <espgk3$2r89$1@news.hub.org>
  References: <8398dc6d0703080426hc9907det376df423e8756a23@mail.gmail.com> <BAY106-F28EC6A8A9B6424BA2CACA5C0790@phx.gbl> <espgk3$2r89$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox