Hi Schlecki habs jetzt im endeffekt eh so zum testen:
Delphi-Quellcode:
begin
opt.addoption('
provider','
p','
provider',false,true,'
','
Set provider path');
try
opt.parse;
if paramcount = 0
then
raise exception.Create('
Parameter missing!');
except
on e :
exception do begin
writeln(e.
message);
writeln(opt.usage);
halt(1);
end;
end;
provider := opt.getoptasstr('
provider');
try
CoInitialize(
nil);
Conn := TADOConnection.Create(
nil);
Conn.ConnectionString := '
Provider='+provider+'
;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=EnvironmentSafe;Data Source=voxctv3';
Conn.Connected := true;
// Query := TADOQuery.Create(nil);
// Query.Connection := Conn;
// Query.SQL.Add('select count(*) from tbcall');
// Query.Active := true;
except
on e :
exception do begin
writeln(e.
message);
halt(1);
end;
end;
end.
ich versuche es jetzt mal wie DeddyH gemeint hat...