Unable to execute MySql Stored Procedure using C++ OTL

Discussion in 'The Lounge' started by sailesh, Mar 30, 2012.

  1. sailesh


    Mar 30, 2012
    Likes Received:
    could not able to execute the mysql stored procedure using OTL in C++ . I can able to run the procedure directly from mysql and can retried the table data which is inserted through the stored procedure.

    But The same thing when I am doing through the C++ code using OTL , it executes successfully , but when I am trying to see data in mysql database it gives NO results.

    I am wondering how can it be possible.

    // call the stored procedure to insert data
    "CREATE PROCEDURE test.Proc_CreateInsertDataRowC(strTagIDData MEDIUMTEXT,iRowCnt INT) "
    "BEGIN "

    "END IF; "
    "END "
    ); // create stored procedure

    odbc::eek:tl_stream o(1, // buffer size should be equal to 1 in case of stored procedure call
    "{call test.Proc_CreateInsertDataRowC("
    " :A<char[5000],in>, "
    " :B<int,in> "
    // stored procedure call
    dbMySQL // connect object

    o.set_commit(0); // set stream auto-commit off since
    // the stream does not generate transaction

    o << strRow.c_str() << iRowCount; // assigning :A = strRow.c_str() and :B = iRowCount

    sailesh, Mar 30, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.