[DUG] Shell Execute wrap lines

Bob Pawley rjpawley at shaw.ca
Thu Feb 9 14:48:36 NZDT 2012


Thanks Dennis

Worked well

Bob

-----Original Message----- 
From: Dennis Chuah
Sent: Wednesday, February 08, 2012 12:05 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Shell Execute wrap lines


Move the last single quote character from the first line to the second line.

Or separate out each logical string on their own line:

ProgramName := '"'+s+'\Quantum GIS Wroclaw\bin\ogr2ogr" "-f" ' +
  ' "PostgreSQL"; ' +
  'PG:"host=' + DBHost +
  'user=postgres ' +
  'dbname=' + DBName +
  ' password=' + Pass+
  '" "' + DXFfile +'" -nln ' +
  'Import_PID' +
  ' "-overwrite" ';


--------------------------------------------------
From: "Bob Pawley" <rjpawley at shaw.ca>
Sent: Thursday, February 09, 2012 8:06 AM
To: "DUG" <delphi at delphi.org.nz>
Subject: [DUG] Shell Execute wrap lines

> Hi
>
> Using BDS 2006 on Win 7.
>
> I have a shell execute trial command  -
> ProgramName := '"'+s+'\Quantum GIS Wroclaw\bin\ogr2ogr" "-f"
> "PostgreSQL"; PG:"host='+DBHost+'
user=postgres dbname='+DBName+' password='+Pass+'" "'+ DXFfile +'" -nln
'+'Import_PID'+' "-overwrite" ';
>
> that, if inserted in Delphi on one line, has no errors and works well.
>
> If I make two lines, as above, I get errors. Iâ?Tve attempted double
> quotes to wrap the command. Iâ?Tve also tried adding + with and without
> quotes and adding + ProgramName to second line â?" all with no joy.
>
> The final command will be considerably longer than the trial command.
>
> How can I organize this so it will be on multiple lines and therefor
> easier to work with?
>
> My searches found only how to create multiple lines for ShowMessage
> strings.
>
> Bob



> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at listserver.123.net.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at listserver.123.net.nz with 
Subject: unsubscribe 



More information about the Delphi mailing list