29OResultSetMetaData::~OResultSetMetaData()
35 sal_Int32 column = _column;
36 if(_column <
static_cast<sal_Int32
>(
m_vMapping.size()))
39 SQLSMALLINT BUFFER_LEN = 128;
40 std::unique_ptr<char[]>
pName(
new char[BUFFER_LEN+1]);
41 SQLSMALLINT nRealLen=0;
43 static_cast<SQLUSMALLINT
>(column),
44 static_cast<SQLUSMALLINT
>(ident),
45 static_cast<SQLPOINTER
>(
pName.get()),
51 if ( nRet == SQL_SUCCESS )
54 nRealLen = BUFFER_LEN;
59 if(nRealLen > BUFFER_LEN)
61 pName.reset(
new char[nRealLen+1]);
63 static_cast<SQLUSMALLINT
>(column),
64 static_cast<SQLUSMALLINT
>(ident),
65 static_cast<SQLPOINTER
>(
pName.get()),
70 if ( nRet == SQL_SUCCESS && nRealLen > 0)
79 ,SQLHANDLE _aStatementHandle
80 ,
const css::uno::Reference< css::uno::XInterface >& _xInterface
86 static_cast<SQLUSMALLINT
>(_column),
87 static_cast<SQLUSMALLINT
>(_ident),
91 &
nValue),_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
97 sal_Int32 column = _column;
98 if(_column <
static_cast<sal_Int32
>(
m_vMapping.size()))
110 ,SQLHANDLE _aStatementHandle
111 ,
const css::uno::Reference< css::uno::XInterface >& _xInterface
114 SQLSMALLINT
nType = 0;
117 nType =
static_cast<SQLSMALLINT
>(
getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE));
118 if(
nType == SQL_UNKNOWN_TYPE)
119 nType =
static_cast<SQLSMALLINT
>(
getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column, SQL_DESC_TYPE));
121 catch(SQLException& )
123 nType =
static_cast<SQLSMALLINT
>(
getNumColAttrib(_pConnection,_aStatementHandle,_xInterface,column,SQL_DESC_CONCISE_TYPE ));
131 std::map<sal_Int32,sal_Int32>::iterator aFind =
m_aColumnTypes.find(column);
140 if(
nType == SQL_UNKNOWN_TYPE)
144 catch(SQLException& )
156 return aFind->second;
164 sal_Int16 nNumResultCols=0;
238 catch(
const SQLException& )
253 catch(
const SQLException& )
276 return getNumColAttrib(column,SQL_DESC_UPDATABLE) == SQL_ATTR_READONLY;
#define N3SQLColAttribute(a, b, c, d, e, f, g)
#define N3SQLNumResultCols(a, b)
oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
SQLRETURN(SQL_API * T3SQLColAttribute)(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttributePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLLEN *NumericAttributePtr)