Subject | Re: [IBO] Feature request: ActiveAtConnect |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-01-25T16:26:09Z |
At 05:47 PM 25-01-02 +0200, you wrote:
...
try
Prepare;
except
on E: ENotDataset do
{ whatever };
end;
if Prepared then
Open;
...
But it doesn't really make a whole lot of sense, because you'll use different components for selectables and executables (query + controls for a dataset, dsql + no controls for an executable).
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com
>2. Can I (in any way) detect if a stored procedure is a 'Select' one?Try to open it and, if you get the error "Cursor is past end-of-file" (or something like that) then you know its not a selectable. You can trap it in the handler that tries to open the dataset. Let's say the error is declared as ENotDataset:
...
try
Prepare;
except
on E: ENotDataset do
{ whatever };
end;
if Prepared then
Open;
...
But it doesn't really make a whole lot of sense, because you'll use different components for selectables and executables (query + controls for a dataset, dsql + no controls for an executable).
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com