I usually create all my queries at design time but the text is set
dynamically at run time.
    Having the query component on my form at design time will help me to
organize my work and of course code completion as was mentionned before.
    All my database tables are defined in my units with constants as their
field names and sizes, therefore when I set the text of my queries at run
time, I use those constants. In case someday I change the name of the field
I only change the value of the constant and won't be obliged to change
anything else in the application.

    The only places where query components are created at run time are in
the units where I need a local query in a procedure that will not be called
more often. But on those forms that I need to display data the query is
created at design time but the text is set and run at initialization time of
the form

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of David Bolton
Sent: Monday, November 28, 2005 12:34 AM



----- Original Message -----
From: "David Smith" <[EMAIL PROTECTED]>

>   Well, I like having them available at design-time
> so I can use code completion. Plus, I don't understand
> why a db component would be "behind the scenes" since
> I usually display the data to the user in some way.
>
> DJS
Thats not a bad way to learn- I did that but I find having all the code in
the main form, eg Tform1.procedure xxx
gets clunky once the app gets a few hundred lines long. I did a large
prototype that way and it used 8 tables. I shared the same ttable component
between all tables and it got messy trying to make sure what did what when.
Once I had access to a framework of classes with queries, it became a lot
easier to maintain.

David Bolton



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



SPONSORED LINKS C programming language  Computer programming languages  Java
programming language
      The c programming language  C programming language  Concept of
programming language


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



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/i7folB/TM
--------------------------------------------------------------------~-> 

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