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

Status
Not open for further replies.

csbrmg

Programmer
Jul 1, 2003
9
ZA
I have a problem executing a stored procedure when using tsqlstoredproc when using the code


tem.StoredProcName :='insertnew';

with tem.Params do
begin
CreateParam(ftInteger, '@Tempid', ptInput);
ParamByName('@Tempid').AsInteger := TID;
CreateParam(ftdatetime, '@dtcreated', ptInput);
ParamByName('@dtcreated').AsDate:= Date;
CreateParam(ftinteger, '@sess', ptInput);
ParamByName('@sess').Asinteger:= sesid;

end;


tem.Open;

i get the error list index out of bounds
 
hi

I think you need a Prepare and ExecProc rather than an Open:
eg

spEmptyDB.Params[1].asstring := TableName;
spEmptyDB.Prepare;
spEmptyDB.ExecProc;

What does your storedproc sql look like?

lou

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top