Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Creating a dynamic TQuery in RAP

edited April 2006 in General
Hi,
in RAP I dynamically create a TQuery. I can set the databasename and the SQL
text. But call Open does not work.

{ ------------------ Code ---------------------------}
var
q: TQuery;
begin
q := TQuery.Create(nil);
q.DatabaseName := 'MyDatabase';
q.SQL.Text := 'select something from somewhere';
q.Open; { Here comes the error }
while not q.Eof do
begin
DoSomething;
q.Next;
end;
end;
{ ------------------ End Code ---------------------------}

ReportBuiler 7.04
Delphi 5

--
Regards
Sven Langenkamp

CT Datentechnik GmbH
Eschenstr. 2
D-31582 Nienburg/Weser
Germany

Telefon: +49 [0] 5021 - 9724-15
Telefax: +49 [0] 5021 - 9724-18
http: www.ctdatentechnik.de
e-mail: langenkamp@ctdatentechnik.de

Comments

This discussion has been closed.