A resolution of an error when using a stored procedure.

zhaozj2021-02-16  56

During this time, I used C Builder. When I called the stored procedure, I met some problems, asked a lot of places did not find the answer, and finally rely on myself, now I will share it with you.

Sample code:

StoredProc1-> params-> clear (); storedproc1-> params-> createparam (ftsmallint, "@ m1", ptinput); storedproc1-> params-> createparam (ftstring, "@ m2", ptoutput; storedproc1-> params -> CreateParam (ftinteger, "@ m3", ptoutput); storedproc1-> params-> createparam (ftinteger, "@ m4", ptoutput); storedproc1-> params-> createparam (ftinteger, "@ m5", ptoutput; StoredProc1-> Params-> CreateParam (ftinteger, "result", ptresult; storedproc1-> prepare (); storedproc1-> execProc ();

Question: When calling the stored procedure, it is always an error. Note that when executing StoredProc1-> execproc () will report an error, the other local report is no longer in this article. Error message when performing code error: Error: Indicator Variable Required But Not Supply

Cause: When the stored procedure is executed, if there is an item, there is such a problem.

Solve: It is possible to process the null value in the stored procedure.

转载请注明原文地址:https://www.9cbs.com/read-22018.html

New Post(0)