Best practice

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
eduard
Posts: 4
Joined: Fri 16 Mar 2007 07:30

Best practice

Post by eduard » Tue 27 Mar 2007 08:42

Hello,

When a user starts a program I only need to fecth one record (example: select userid and some additional information). This information will not be changed during the session. (read only)

Is there a (performance) difference between:

1. storing the select result in local variables (record type) and close the Table/Sql or StoredProc

2. using data aware components like Table/Sql/StoredProc and display the information with DBEdit-controls and keeping the table active/open


Please let me know......

Eduard


BTW thanks for all the previous answers :!:

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 27 Mar 2007 13:29

There is no significant difference for a single record, but the way with using local variables will save some kilobytes of memory for your application.

Post Reply