[fpc-devel] TSQLConnection.CharSet improvement suggestion
graemeg.lists at gmail.com
Tue May 26 15:58:09 CEST 2009
2009/5/26 Michael Van Canneyt <michael at freepascal.org>:
> That's not a good reason: Delphi simply doesn't provide the
> username/password properties, so you are forced to use params.
Fair enough observation. :)
>> What I am suggesting is simply that the dedicated properties Username,
>> Password, Charset, etc. check it field variable first and if it's
>> blank, then as a fallback it checks the Params values.
> But why would you duplicate information ?
It's not duplicating information, it's providing a fallback. Maybe the
user did not specify a username and password via the dedicated
properties because they are used to the way Delphi works or ported a
Delphi project. Instead they used the Params property. The dedicated
properties will take precedence and I'll update the docs to reflect
that. Currently the developer would see a connection error, when in
fact the information is there (in Params property), just not checked
The last two days i have spent a lot more time looking at the db
components, and it seems the Params property is a lot of the time
> if there is a property charset, why for god's sake would you
> want to enter the same information again in the parameters ?
Like I said above. Normally you would not duplicate the information.
The checking of Params property is simply a fallback for information.
Users might have ported Delphi apps to FPC and are used to the Params
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the fpc-devel