Subject Getting validation source from a domain
Author Ed Dressel
I am using the code below to try to get the validation source for a
domain--but it doesn't return anything. I try the same SQL in IBExpert
(which last I knew used IBO) and it returns a value... what am I
forgetting?

Thanks
Ed Dressel

lCursor := CreateCursor('SELECT First 1 RDB$VALIDATION_SOURCE
FROM RDB$FIELDS WHERE RDB$FIELD_NAME = ''%s''',
[UpperCase(aName)]);
try
try
if not (FTx.TransactionIsActive or FTx.InTransaction) then
FTx.StartTransaction;
lCursor.Open;
result := lCursor.RecordCount > 0;
if result then
aValidationSource := lCursor.Fields[0].AsString
else
aValidationSource := '';
FTx.Commit;
except
FTx.Rollback;
raise;
end;
finally
lCursor.Free;
end;