Subject Re: [IBO] Re: Reset params if a TIB_StoredProc
Author Daniel Rail
Hi,

At May 6, 2004, 18:53, Helen Borrie wrote:

> At 06:43 PM 6/05/2004 +0000, you wrote:
>> > >I have solve it doing: sp.ParamByName("TIME").Clear();
>> > >
>> > >But I am looking for a function to "reset" all parameters.
>> >
>> > sp.Params.ClearBuffers;
>> >
>> > Helen
>>In the ExecSQL help it's clearly stated, but I discover it by "the
>>hard way". Maybe there should be a list of those "tips" somewhere.

> Seems a good idea.

>>And, is the following bug for Jason? If I use
>>sp.ParamByName("MYNAME").Value := NULL, it retains the previous value
>>(MYNAME is a varchar field).

> If it doesn't throw an exception, it's a bug. Delphi doesn't have NULL.

Yes it does. NULL is of type variant and means the same thing as in
Firebird. And, I use it just to check if a variant contains data.

> I
> seem to recall you can assign NULL by using some trick (NullAsVar and
> assigning it to the Value property?). Apart from that, using the Clear
> method is the only way I know to get a parameter to be NULL.

I agree. The Clear method is the only way that I know of, that works.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)