Subject | Re: [IBO] Params |
---|---|
Author | Geoff Worboys |
Post date | 2001-07-19T03:00:43Z |
Actually...
Just seems a little strange.
For best clarity of code avoid using parameter names that are the same
as the field or table names. So try...
ANISDB.SQL.CLEAR;
ANISDB.SQL.ADD('SELECT * FROM ANI WHERE ANI = :ANI_PARAM');
ANISDB.ParamByName('ANI_PARAM').asstring := aniedit.text;
ANISDB.OPEN;
I dont think it should matter, but it is confusing and could possibly
be the cause of a problem not seen before.
HTH
Geoff Worboys
Telesis Computing
> ANISDB.SQL.ADD('SELECT * FROM ANI WHERE ANI = :ANI');Does your table named "ANI" also have a field named "ANI" ?
Just seems a little strange.
For best clarity of code avoid using parameter names that are the same
as the field or table names. So try...
ANISDB.SQL.CLEAR;
ANISDB.SQL.ADD('SELECT * FROM ANI WHERE ANI = :ANI_PARAM');
ANISDB.ParamByName('ANI_PARAM').asstring := aniedit.text;
ANISDB.OPEN;
I dont think it should matter, but it is confusing and could possibly
be the cause of a problem not seen before.
HTH
Geoff Worboys
Telesis Computing