Page 1 of 1

How to clear a table type parameter

Posted: Wed 20 Jan 2016 15:55
by Nilss
Hello,

when using table type parameters how can they be cleared?

Parameter assignment as in the help file is used:
MSStoredProc.ParamByName('TVP').AsTable := MSTableData.Table;
However, the TMSTableData object is not only closed but destroyed after the stored procedure is executed. This leaves a reference in TMSParam object, which will cause an access violation when stored procedure is prepared the next time.

Calling Clear procedure of TMSParam did not completely reset the parameter, neither did assigning nil to AsTable property work.

SDAC version is 7.1.3 for RAD Studio 7.

Re: How to clear a table type parameter

Posted: Thu 21 Jan 2016 16:10
by LHSoft
MSStoredProc.ParamByName('TVP').Value := NULL