Delphi Command Line query application

Delphi Command Line query application

Post by Chris Town » Mon, 26 Feb 2007 01:43:16


I am trying to create an application, that can be run at the command line to
process SQL querries from a wide variety of source systems.

I will want to pass parameters at the command line to tell it what
datasource to use, and what query to execute...

Any suggestions for directions to get me started?
 
 
 

Delphi Command Line query application

Post by Erich Gthn » Wed, 28 Feb 2007 18:11:45

Hello Chris,
habve a look at "ParamCount" and "ParamStr" in the Delphi-Help if avaiable.

Or study this examble (from help)

procedure TForm1.FormCreate(Sender: TObject);

var
i: Integer;
for i := 1 to ParamCount do
begin
if LowerCase(ParamStr(i)) = 'beep' then
Beep
else if LowerCase(ParamStr(i)) = 'exit' then
Application.Terminate;
end;
end;


The function ParamCount givs you the numbers of parameters
The Function ParamStr givs you the parameters bey his Index
Usee the "," to seperate more than one parameter

Erich

Chris Townsend schrieb: