Subject | RE: [IBO] Lookup problem |
---|---|
Author | Norman Dunbar |
Post date | 2002-09-02T09:47:29Z |
Malcolm,
I've downloaded the project and had a quick look :
You have defined the boolean field as 'BLANKISNULL'. I think it's a bad idea
to have a field which is defined as having two values (True and False) and
allowing nulls as well. I would change the BLANKISNULL to REQUIRED so that
there must be a value there - an IP address is either local or it isn't -
there are no grey/gray areas there :o)
Not only that, but Helen's advice in the GSG is 'never set BLANKISNULL on
any field constrained in the databases as NOT NULL' and as your field is
indeed NOT NULL .........
I was also able to add a new row to your IPAddress tab without any problems.
The fact that I cannot change the local checkbox *is* a slight drawback - I
admit. (I can set it when I add the record, but not change it afterwards.)
Constructive criticism :
Your IPLOOKUP.IPL_LOCAL column is defined as CHAR(1) default 'Y' but has no
check constraint added to ensure that it is a 'Y' or 'N'. This measn that
someone *could* use IB_SQL (or a similar utility) to insert data into your
table which violates the values that your application expects (Y or N).
I've made the following changes and BUILT the project :
Removed BLANKISNULL from IPL_LOCAL.
Added REQUIRED to IPL_LOCAL.
Changed the RequestLive property of qryIPLookup to true - so you can edit
the live data.
BUILD the project.
The IPADDRESS tab of the program is no longer read only :o)
Regards,
Norman.
PS. I'm doing a tutorial too in Delphi and C++Builder :o)
-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------
-----Original Message-----
From: Malcolm Smith [mailto:mjfreelancing@...]
Sent: Monday, September 02, 2002 8:54 AM
To: IBObjects List (E-mail)
Subject: [IBO] Lookup problem
I've been working on this all day but now have to ask for help.
I have uploaded a demo project which I am going to use as the basis for a
tutorial on IBObjects - as soon as I understand everything - at
http:///www.mjfreelancing.com/download/ibo_testproject.zip
<SNIP>
This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.
I've downloaded the project and had a quick look :
You have defined the boolean field as 'BLANKISNULL'. I think it's a bad idea
to have a field which is defined as having two values (True and False) and
allowing nulls as well. I would change the BLANKISNULL to REQUIRED so that
there must be a value there - an IP address is either local or it isn't -
there are no grey/gray areas there :o)
Not only that, but Helen's advice in the GSG is 'never set BLANKISNULL on
any field constrained in the databases as NOT NULL' and as your field is
indeed NOT NULL .........
I was also able to add a new row to your IPAddress tab without any problems.
The fact that I cannot change the local checkbox *is* a slight drawback - I
admit. (I can set it when I add the record, but not change it afterwards.)
Constructive criticism :
Your IPLOOKUP.IPL_LOCAL column is defined as CHAR(1) default 'Y' but has no
check constraint added to ensure that it is a 'Y' or 'N'. This measn that
someone *could* use IB_SQL (or a similar utility) to insert data into your
table which violates the values that your application expects (Y or N).
I've made the following changes and BUILT the project :
Removed BLANKISNULL from IPL_LOCAL.
Added REQUIRED to IPL_LOCAL.
Changed the RequestLive property of qryIPLookup to true - so you can edit
the live data.
BUILD the project.
The IPADDRESS tab of the program is no longer read only :o)
Regards,
Norman.
PS. I'm doing a tutorial too in Delphi and C++Builder :o)
-------------------------------------
Norman Dunbar
Database/Unix administrator
Lynx Financial Systems Ltd.
mailto:Norman.Dunbar@...
Tel: 0113 289 6265
Fax: 0113 289 3146
URL: http://www.Lynx-FS.com
-------------------------------------
-----Original Message-----
From: Malcolm Smith [mailto:mjfreelancing@...]
Sent: Monday, September 02, 2002 8:54 AM
To: IBObjects List (E-mail)
Subject: [IBO] Lookup problem
I've been working on this all day but now have to ask for help.
I have uploaded a demo project which I am going to use as the basis for a
tutorial on IBObjects - as soon as I understand everything - at
http:///www.mjfreelancing.com/download/ibo_testproject.zip
<SNIP>
This email is intended only for the use of the addressees named above and
may be confidential or legally privileged. If you are not an addressee you
must not read it and must not use any information contained in it, nor copy
it, nor inform any person other than Lynx Financial Systems or the
addressees of its existence or contents. If you have received this email
and are not a named addressee, please delete it and notify the Lynx
Financial Systems IT Department on 0113 2892990.