`
sogo6
  • 浏览: 113405 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

PROCEDURE can't return a result set in the given context

阅读更多
调用存储过程失败!出现如下错误:

    PROCEDURE ipbx.qu_ery can't return a result set in the given context.

    ipbx是数据库

    qu_ery是自己写的存储过程的名字


原因:连接数据库的方式不正确。

导致报错的连接方式:

if(!mysql_real_connect(&mysql,"localhost","root","123456",
    "ipbx",0,NULL,0))
{
    printf("mysql_real_connect() failed!/n");
    mysql_close(&mysql);
    return 0;
}


正确的连接方式:             
if(!mysql_real_connect(&mysql,"localhost","root","123456",
    "ipbx",0,NULL,CLIENT_MULTI_STATEMENTS))
{
    printf("mysql_real_connect() failed!/n");
    mysql_close(&mysql);
    return 0;
}

修改一下连接数据库的方式的参数就OK了!
分享到:
评论

相关推荐

    数位板压力测试

    The device must define an absolute or relative coordi-nate space in at least two dimensions for which it can return position data. The device must have a point-ing ap¬para¬tus or method (such as a ...

    微软内部资料-SQL性能优化3

    To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...

    PLSQL.Developer(X64) v12.0.1.1814 主程序+ v11中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    PLSQL.Developer(X32) v12.0.1.1814主程序+ v11中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.4.1826x32主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.6.1832x32主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.4.1826x64主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    a project model for the FreeBSD Project.7z

    [1] This paper will provide such a project model and is donated to the FreeBSD Documentation project where it can evolve together with the project so that it can at any point in time reflect the way ...

    微软内部资料-SQL性能优化5

    Each index row in node pages contains an index key (or set of keys for a composite index) and a pointer to a page at the next level for which the first key value is the same as the key value in the ...

    plsqldev12.0.6.1832x64主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: The result rectangle incorrectly calculated in the TFlexText.GetRefreshRect method. - FIX: Added FPaintCache.rcPaint cleanup in the TFlexPanel.WMPaint method. Now it is possible to define is ...

    微软内部资料-SQL性能优化2

    Assuming the page reference does not result in an access violation, a page fault can be either hard or soft. A hard page fault results in a read from disk, either a page file or memory-mapped file. A...

    i-vector的工具箱

    On the other hand, in the i-vector framework the speaker models are estimated through a procedure called Eigenvoice adaptation. A total variability subspace is learned from the development set and is...

    A Procedure for the Solution of Lambert's Orbital Boundary V.pdf

    The overall procedure has been implemented via three Fortran-77 subroutines, listings of which are appended to the paper, and the way in which the subroutines have been tested is outlined.

    oracle procedure

    CREATE OR REPLACE PROCEDURE test_xg_p2 (a IN NUMBER, x OUT NUMBER) IS BEGIN x := a; END test_xg_p2; ``` 此Procedure接受一个输入参数`a`并将其赋值给输出参数`x`。 ### 使用CASE语句进行条件判断 #### ...

    Sakemail

    The side effect for this is that YOUR app must check if the host is a host name or a IP address, in my app I remove the periods and try to convert the result to a float (long integers don‘t work, ...

    折半查找 binarySearch

    If the list of names is in sorted order, a binary search will find a given name with far fewer probes than the simple procedure of probing each name in the list, one after the other in a linear ...

    VclZip pro v3.10.1

    PLEASE TAKE A LOOK AT THE "WHAT's NEW IN THIS VERSION" LINK IN THE HELP FILE AS IT HAS CONVENIENT LINKS TO ALL OF THE NEW TOPICS. ==================== Version 3.10 Build 1 - Several bug fixes. - ...

Global site tag (gtag.js) - Google Analytics