---dws scripts
var q: TQuery;
q := TQuery.Create('DBDEMOS', 'select * from customer');
q.First;
while not q.Eof do
begin
Print(q.FieldByName('CustNo').AsInteger);
Print(', ');
PrintLn(q.FieldByName('Company').AsString);
q.Next;
end;
---end of dws
why there are errors when I write like this:
q := TQuery.Create('DBDEMOS');
q.Execute('select * from customer');
sences the Execute method is not defined~
so what properties and methods does this TQuery type in dws have?
By the way,can someone offer a detailed demo of Database connection and SQL execution?
bad english,sorry~
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sorry,there is no method Execute in Tquery~
My question is that are the TQuery in dws and TQuery of BDE in delphi not the same type?
because some properties and methods of TQuery in BDE are not supported by the TQuery in dws,such as "q.SQL.Add('');" will cause a compiling error says "no member with name SQL"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
---dws scripts
var q: TQuery;
q := TQuery.Create('DBDEMOS', 'select * from customer');
q.First;
while not q.Eof do
begin
Print(q.FieldByName('CustNo').AsInteger);
Print(', ');
PrintLn(q.FieldByName('Company').AsString);
q.Next;
end;
---end of dws
why there are errors when I write like this:
q := TQuery.Create('DBDEMOS');
q.Execute('select * from customer');
sences the Execute method is not defined~
so what properties and methods does this TQuery type in dws have?
By the way,can someone offer a detailed demo of Database connection and SQL execution?
bad english,sorry~
sorry,there is no method Execute in Tquery~
My question is that are the TQuery in dws and TQuery of BDE in delphi not the same type?
because some properties and methods of TQuery in BDE are not supported by the TQuery in dws,such as "q.SQL.Add('');" will cause a compiling error says "no member with name SQL"