first close ?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
RH
Posts: 31
Joined: Sat 16 Sep 2006 06:32

first close ?

Post by RH » Tue 19 Sep 2006 19:37

Just a quick question about calling open for TMyQuery

1. Do I need to call close, brore I set the SQL.text property and open. That is

Close
SQL.text:=text
open

or is there no need for close: Just

SQL.text:=text
open

?

2. Do I need to call First after open, or is Bof automatically set ?

Thanks

:D

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

Post by Antaeus » Wed 20 Sep 2006 11:03

1. There is no need to call Close method before changing SQL property, it is called automatically when SQL property changes.

2. This is not necessary too. After opening for example MyQuery, cursor is positioned on the first record.

RH
Posts: 31
Joined: Sat 16 Sep 2006 06:32

Post by RH » Wed 20 Sep 2006 16:15

Thats great. thanks :D

Post Reply