znone
2020-09-04 335f8f02800eb8bc053d22c5e505d93a1443dfca
修复ODBC调用的错误。
1 files modified
12 ■■■■ changed files
include/qtl_odbc.hpp 12 ●●●● patch | view | raw | blame | history
include/qtl_odbc.hpp
@@ -776,7 +776,7 @@
            SQLULEN column_size;
            SQLSMALLINT digits;
            SQLSMALLINT nullable;
            verify_error(SQLDescribeCol(m_handle, i, field_name, sizeof(field_name), &name_length,
            verify_error(SQLDescribeColA(m_handle, i, field_name, sizeof(field_name), &name_length,
                &data_type, &column_size, &digits, &nullable));
            if(strncmp((char*)field_name, name, name_length)==0)
                return i;
@@ -949,7 +949,15 @@
    void set_attribute(SQLINTEGER attr, SQLINTEGER value)
    {
        verify_error(SQLSetConnectAttr(m_handle, attr, &value, 0));
        verify_error(SQLSetConnectAttr(m_handle, attr, (SQLPOINTER)value, 0));
    }
    void set_attribute(SQLINTEGER attr, const char* value)
    {
        verify_error(SQLSetConnectAttr(m_handle, attr, (SQLPOINTER)value, SQL_NTS));
    }
    void set_attribute(SQLINTEGER attr, const std::string& value)
    {
        verify_error(SQLSetConnectAttr(m_handle, attr, (SQLPOINTER)value.data(), value.size()));
    }
    void get_attribute(SQLINTEGER attr, SQLINTEGER& value) const
    {