An incorrect workaround when using stored procedures.

Source: Internet
Author: User
Stored Procedure | error | Resolution


This period of time with C + + Builder, in the call stored procedures encountered some problems, asked a lot of places did not find the answer, and finally rely on their own, now take out and share.





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 ();








problem: Call stored procedures always error, attention, when executing storedproc1->execproc () will be an error, the other local reported the wrong solution is no longer this article. Error message when executing code errors hint: Error: Indicator variable required but not supplied





reason: This problem occurs when the stored procedure is executed, if there is an empty value of the item





solution: In the stored procedure for the production of null value processing, it can be








Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.