Determining parameter in TADOStoredProc
- From: Andy Stephenson <info2004@xxxxxxxxxxxxx>
- Date: Thu, 11 Oct 2007 09:56:51 +0100
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
.
- Follow-Ups:
- Re: Determining parameter in TADOStoredProc
- From: Dmitry Arefiev [da-soft.com]
- Re: Determining parameter in TADOStoredProc
- Prev by Date: Re: TADOStoredProc
- Next by Date: Re: TADOStoredProc
- Previous by thread: Free Interbase & Firebird OLE DB - iboledb 2.0.0207 (released Nov 18, 2006)
- Next by thread: Re: Determining parameter in TADOStoredProc
- Index(es):