Registriert seit: 23. Jan 2008
3.686 Beiträge
Delphi 2007 Enterprise
|
AW: sql query
29. Mär 2012, 13:30
Delphi-Quellcode:
procedure DoQuery( const sQuerySQL: string);
var
i: Integer;
begin
oTmpQry := TADOQuery.Create( nil);
try
try
oTmpQry.Connection := Conn;
oTmpQry.CommandTimeout := 5000;
oTmpQry.SQL.Text := sQuerySQL;
oTmpQry.Open;
while not oTmpQry.eof do
begin
for i := 0 to oTmpQry.Fields.Count-1 do
begin
Write(oTmpQry.Fields[i].asString+#9);
end;
oTmpQry.Next;
Writeln;
end;
except
on e : exception do begin
Writeln(e. message);
end;
end;
Finally
oTmpQry.free;
end;
end;
So die Ecke? Lässt halt die Stringliste als Ausgabeparameter weg, und wuppert sofort alles auf die cmd.
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
|