Subject | Re: [IBO] A few questions |
---|---|
Author | Geoff Worboys |
Post date | 2001-08-06T03:57:36Z |
> 1- In my first shot at making an IB_component, I encounteredThis is a standard problem with DataField properties. You can usually
> a rather strange phenomenon where setting the datafield at
> design time (after having set the datasource property and a
> query dataset) through the object inspector gives an
> 'Invalid class typecast' error.
type the field name directly into the property, but the selection list
presents this error.
You need to register a property editor for this control. If you look
at IB_Editors.pas you will see where Jason has setup a function to
make this easier, eg;
RegisterDataFieldPropertyEditor( TIB_CustomCheckBox );
> 2- Is it possible to retrieve a database's column defaultIt is possible (see GetServerDefaults property) but generally not
> values at design time from the server, so that any new
> query referencing those columns will automatically acquire
> these defaults?
recommended due to performance impacts.
> 3- Is it possible to enter column settings (defaults, blankTake a look at TIB_Connection, it has all the Fields*,
> is null, boolean, etc...) in a central location, and have
> any queries automatically inherit these settings?
ColumnAttributes etc properties. It also provides a FieldEntryTypes
property where you can optionally enable the fetDomainName and/or
fetSQLType attributes to allow the various attributes to be set by
domain name or SQL type.
Note: It works something like...
If the connection has an entry like...
Table_Name.Field_Name= ....
then that will be found as an exact match otherwise
Field_Name=...
will be found as a field name only match otherwise
Domain_Name=...
will be found otherwise
SQL_Type=...
HTH
Geoff Worboys
Telesis Computing