Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem using tsqlstoredproc with dbexpress

Status
Not open for further replies.

csbrmg

Programmer
Jul 1, 2003
9
ZA
I want to execute a stored procedure from my MS SQL server database base but when trying to execute the code below the error message "List index out of bounds (0)" appears.The procedure i executed perfectly when i remove its parameters and hard code the input as following code
tem:tsqlstoredproc
.................................
with tem do
begin
p1:=tparam.Create(params,ptInput);
StoredProcName:='getUniqueInstance';
Parambyname('@val').AsInteger:=TID;
params.Clear;
params.CreateParam(ftinteger, '@val', ptInputOutput);
params.ParamByName('@val').AsInteger:=TID;
execproc;//<- error occurs here
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top