Menu

questions in DbDemos

DWS Forum
2007-06-05
2013-04-15
  • Nobody/Anonymous

    ---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~

     
    • Nobody/Anonymous

      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"

       

Log in to post a comment.