Re: TDataBase and TQuary
- From: DB-1 <db1@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Oct 2007 12:34:26 +0200
Anton wrote:
1. Create a TDatabase
2. Set its DatabaseName to my DB's Alias (as in BDE)
3. Call the Open method
I would suggest using TDatabase that you already have on a Form during
design time. This way there is less possibilities to do beginner
mistakes.
Ensure that TDatabase has Active = False before the last compilation.
Then at run-time set the Path for TDatabase in Form's OnCreate event, or
in some other early event. Then turn TDatabase.Active = True.
4. Create a TQuery
5. Set its DatabaseName to that of TDatabase
6. Use it.
I would suggest using design time created TQuery also, that points to
the TDatabase already on design time, so you do not need to re-set
anything to TQuery, just open it. All this is again just to minimize
possible beginner mistakes.
When you get these two phases working, there is quite an easy step to
jump to those at run-time created TDatabase and TQuery. If you for some
reason have excessive need for that.
DB-1
.
- References:
- TDataBase and TQuary
- From: Anton
- TDataBase and TQuary
- Prev by Date: buy cheap runescape gold on http://www.cheap-runescape-gold.com
- Next by Date: Re: TDataBase and TQuary
- Previous by thread: TDataBase and TQuary
- Next by thread: Re: TDataBase and TQuary
- Index(es):
Relevant Pages
|