do you mean fetch data...
    what SQL does is already fetch data from tables, now you have to be able
to use the fetch data

    you can iterate through a query just like tables

    DB.First; DB.Last; DB.Prior; DB.Next; DB.Eof etc...

    ShowMessage(DB.FieldByName('field1).AsString) for example...

    or TempVariable := DB.Fields[1].AsInteger etc...

Some things to consider before proceeding

    ExecSQL should be used to Update/Insert/Delete as for SELECT you should
use DB.Open or DB.Active := true
    Avoid using 'Select * from...' include the necessary fields in the sql
statement, if you need 10 fields for example in your query no need to fetch
the existing 40 fields for example....
    A wide discussion can  be done about the pros and cons of using * in
select but I guess that's out of the subject right now
    You can assign your query to any datasource and to any data aware
controls... I'm not sure about dbexpress queries but some components allow
insert/edits on a query component

    hope it helped
Vahan

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of smart9dotcom
Sent: Thursday, July 07, 2005 10:11 AM
To: [email protected]
Subject: [delphi-en] fetch info with dbExpress ?


Hello ..

i am using dbExpress with MySQL , i written this code :

DB.Close;
DB.SQL.Clear;
DB.SQL.Add('SELECT * FROM MySBB_subject ORDER BY id DESC LIMIT 1,1');
DB.ExecSQL;
Memo1.Lines.Add(SM.TraceList.Text);

but i don't know how i can fetcho info now ?




-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


----------------------------------------------------------------------------
----




[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to