0x0A35D340(libpq.dll)的未处理异常

时间:2017-11-16 14:02:06

标签: c++ postgresql visual-studio-2013

这个例外是我的问题: 在0x0A35D340(libpq.dll)处未处理的异常,它并不总是出现但有些时间。当我的程序在postgresql上执行查询插入时出现。我以这种方式准备我的查询:

    CString query_select = "SELECT * FROM ";
    query_select += nometab;
    QString query_insert = "INSERT INTO ";
    if (nometab.Compare("OFFSET") == 0)
        query_insert += nometabtmp;
    else
        query_insert += nometab;

    query_insert += " VALUES (";//inserire i campi


    for (int i = 0; i < n_fields; i++)
    {
        if (i < n_fields - 1)
            query_insert += "?, ";
        else
            query_insert += "?) ";

    }

    if (dbSet.IsOpen())
        dbSet.Close();

    dbSet.Open(dbOpenDynaset, query_select);

    qryInsert->prepare(query_insert);
    ........//other code to prepare a query
    qryInsert->addBindValue((myvalue));
    if (!qryInsert->exec()){...}
你知道吗?非常感谢!

0 个答案:

没有答案