Determining parameter in TADOStoredProc



Hi,

Recently, a parameter on an MSMSQL server within a stored procedure has changed from text to binary.

I am already using this stored procedure usinf TADOStoredProc(sorry, not TadoDataset and TadoCommand), and this particular parameter is being loaded from a stream:
Parameters.ParamByName('@rawpacket').LoadFromStream(MS, ftMemo);

Since the change, I would like to test the type of the parameter and load accordingly. I tried:
if (Parameters.ParamByName('@rawpacket').DataType is ftMemo) then
begin
Parameters.ParamByName('@rawpacket').LoadFromStream(MS, ftMemo);
end;

But this won't compile.

Ultimately, I am trying to get to something like:

if (some test here) then
Parameters.ParamByName('@rawpacket').LoadFromStream(MS, ftMemo)
else
Parameters.ParamByName('@rawpacket').LoadFromStream(MS, ftBlob);

I would rather do it based on what the database says, rather than a setting in an inifile.

How can I do this?

Thanks,


Andy
.