summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-28 14:09:39 +0200
committerNoel Grandin <noel@peralex.com>2015-05-29 08:48:09 +0200
commit66dd3427652e4297b12c76bb1a28bc81d4a70c87 (patch)
treee34a73478da9ad9135d1693e4d23146c24158220
parentf2bd8b5e0907d804feb7082708bc8be7b6075a26 (diff)
convert ODBC3SQL constants to scoped enum
Change-Id: I61d2b76a32be23d238b1f50a6a76975d64d1878c
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/odbc/ORealDriver.cxx112
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx6
-rw-r--r--connectivity/source/drivers/odbc/OResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx24
-rw-r--r--connectivity/source/inc/odbc/OConnection.hxx3
-rw-r--r--connectivity/source/inc/odbc/ODatabaseMetaData.hxx2
-rw-r--r--connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx2
-rw-r--r--connectivity/source/inc/odbc/ODriver.hxx3
-rw-r--r--connectivity/source/inc/odbc/OFunctions.hxx122
-rw-r--r--connectivity/source/inc/odbc/OResultSet.hxx2
-rw-r--r--connectivity/source/inc/odbc/OResultSetMetaData.hxx2
-rw-r--r--connectivity/source/inc/odbc/OStatement.hxx2
-rw-r--r--connectivity/source/inc/odbc/OTools.hxx111
15 files changed, 201 insertions, 196 deletions
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index d88bb0495335..458819ee4a0c 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -90,7 +90,7 @@ void SAL_CALL OConnection::release() throw()
relase_ChildImpl();
}
-oslGenericFunction OConnection::getOdbcFunction(sal_Int32 _nIndex) const
+oslGenericFunction OConnection::getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
OSL_ENSURE(m_pDriver,"OConnection::getOdbcFunction: m_pDriver is null!");
return m_pDriver->getOdbcFunction(_nIndex);
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index f5ff4e37cb41..a611ebe191e9 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -391,7 +391,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
rDataLen = _nDataLen;
SQLRETURN nRetcode;
- nRetcode = (*reinterpret_cast<T3SQLBindParameter>(m_pConnection->getOdbcFunction(ODBC3SQLBindParameter)))(
+ nRetcode = (*reinterpret_cast<T3SQLBindParameter>(m_pConnection->getOdbcFunction(ODBC3SQLFunctionId::BindParameter)))(
m_aStatementHandle,
// checkParameterIndex guarantees this is safe
static_cast<SQLUSMALLINT>(parameterIndex),
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx
index 2012cf59dff4..27b23ff7d047 100644
--- a/connectivity/source/drivers/odbc/ORealDriver.cxx
+++ b/connectivity/source/drivers/odbc/ORealDriver.cxx
@@ -94,225 +94,225 @@ namespace connectivity
class ORealObdcDriver : public ODBCDriver
{
protected:
- virtual oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const SAL_OVERRIDE;
+ virtual oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const SAL_OVERRIDE;
virtual SQLHANDLE EnvironmentHandle(OUString &_rPath) SAL_OVERRIDE;
public:
ORealObdcDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) : ODBCDriver(_rxFactory) {}
};
-oslGenericFunction ORealObdcDriver::getOdbcFunction(sal_Int32 _nIndex) const
+oslGenericFunction ORealObdcDriver::getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
oslGenericFunction pFunction = NULL;
switch(_nIndex)
{
- case ODBC3SQLAllocHandle:
+ case ODBC3SQLFunctionId::AllocHandle:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLAllocHandle);
break;
- case ODBC3SQLConnect:
+ case ODBC3SQLFunctionId::Connect:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLConnect);
break;
- case ODBC3SQLDriverConnect:
+ case ODBC3SQLFunctionId::DriverConnect:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDriverConnect);
break;
- case ODBC3SQLBrowseConnect:
+ case ODBC3SQLFunctionId::BrowseConnect:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLBrowseConnect);
break;
- case ODBC3SQLDataSources:
+ case ODBC3SQLFunctionId::DataSources:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDataSources);
break;
- case ODBC3SQLDrivers:
+ case ODBC3SQLFunctionId::Drivers:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDrivers);
break;
- case ODBC3SQLGetInfo:
+ case ODBC3SQLFunctionId::GetInfo:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetInfo);
break;
- case ODBC3SQLGetFunctions:
+ case ODBC3SQLFunctionId::GetFunctions:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetFunctions);
break;
- case ODBC3SQLGetTypeInfo:
+ case ODBC3SQLFunctionId::GetTypeInfo:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetTypeInfo);
break;
- case ODBC3SQLSetConnectAttr:
+ case ODBC3SQLFunctionId::SetConnectAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSetConnectAttr);
break;
- case ODBC3SQLGetConnectAttr:
+ case ODBC3SQLFunctionId::GetConnectAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetConnectAttr);
break;
- case ODBC3SQLSetEnvAttr:
+ case ODBC3SQLFunctionId::SetEnvAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSetEnvAttr);
break;
- case ODBC3SQLGetEnvAttr:
+ case ODBC3SQLFunctionId::GetEnvAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetEnvAttr);
break;
- case ODBC3SQLSetStmtAttr:
+ case ODBC3SQLFunctionId::SetStmtAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSetStmtAttr);
break;
- case ODBC3SQLGetStmtAttr:
+ case ODBC3SQLFunctionId::GetStmtAttr:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetStmtAttr);
break;
- case ODBC3SQLPrepare:
+ case ODBC3SQLFunctionId::Prepare:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLPrepare);
break;
- case ODBC3SQLBindParameter:
+ case ODBC3SQLFunctionId::BindParameter:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLBindParameter);
break;
- case ODBC3SQLSetCursorName:
+ case ODBC3SQLFunctionId::SetCursorName:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSetCursorName);
break;
- case ODBC3SQLExecute:
+ case ODBC3SQLFunctionId::Execute:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLExecute);
break;
- case ODBC3SQLExecDirect:
+ case ODBC3SQLFunctionId::ExecDirect:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLExecDirect);
break;
- case ODBC3SQLDescribeParam:
+ case ODBC3SQLFunctionId::DescribeParam:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDescribeParam);
break;
- case ODBC3SQLNumParams:
+ case ODBC3SQLFunctionId::NumParams:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLNumParams);
break;
- case ODBC3SQLParamData:
+ case ODBC3SQLFunctionId::ParamData:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLParamData);
break;
- case ODBC3SQLPutData:
+ case ODBC3SQLFunctionId::PutData:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLPutData);
break;
- case ODBC3SQLRowCount:
+ case ODBC3SQLFunctionId::RowCount:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLRowCount);
break;
- case ODBC3SQLNumResultCols:
+ case ODBC3SQLFunctionId::NumResultCols:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLNumResultCols);
break;
- case ODBC3SQLDescribeCol:
+ case ODBC3SQLFunctionId::DescribeCol:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDescribeCol);
break;
- case ODBC3SQLColAttribute:
+ case ODBC3SQLFunctionId::ColAttribute:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLColAttribute);
break;
- case ODBC3SQLBindCol:
+ case ODBC3SQLFunctionId::BindCol:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLBindCol);
break;
- case ODBC3SQLFetch:
+ case ODBC3SQLFunctionId::Fetch:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLFetch);
break;
- case ODBC3SQLFetchScroll:
+ case ODBC3SQLFunctionId::FetchScroll:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLFetchScroll);
break;
- case ODBC3SQLGetData:
+ case ODBC3SQLFunctionId::GetData:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetData);
break;
- case ODBC3SQLSetPos:
+ case ODBC3SQLFunctionId::SetPos:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSetPos);
break;
- case ODBC3SQLBulkOperations:
+ case ODBC3SQLFunctionId::BulkOperations:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLBulkOperations);
break;
- case ODBC3SQLMoreResults:
+ case ODBC3SQLFunctionId::MoreResults:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLMoreResults);
break;
- case ODBC3SQLGetDiagRec:
+ case ODBC3SQLFunctionId::GetDiagRec:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetDiagRec);
break;
- case ODBC3SQLColumnPrivileges:
+ case ODBC3SQLFunctionId::ColumnPrivileges:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLColumnPrivileges);
break;
- case ODBC3SQLColumns:
+ case ODBC3SQLFunctionId::Columns:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLColumns);
break;
- case ODBC3SQLForeignKeys:
+ case ODBC3SQLFunctionId::ForeignKeys:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLForeignKeys);
break;
- case ODBC3SQLPrimaryKeys:
+ case ODBC3SQLFunctionId::PrimaryKeys:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLPrimaryKeys);
break;
- case ODBC3SQLProcedureColumns:
+ case ODBC3SQLFunctionId::ProcedureColumns:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLProcedureColumns);
break;
- case ODBC3SQLProcedures:
+ case ODBC3SQLFunctionId::Procedures:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLProcedures);
break;
- case ODBC3SQLSpecialColumns:
+ case ODBC3SQLFunctionId::SpecialColumns:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLSpecialColumns);
break;
- case ODBC3SQLStatistics:
+ case ODBC3SQLFunctionId::Statistics:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLStatistics);
break;
- case ODBC3SQLTablePrivileges:
+ case ODBC3SQLFunctionId::TablePrivileges:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLTablePrivileges);
break;
- case ODBC3SQLTables:
+ case ODBC3SQLFunctionId::Tables:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLTables);
break;
- case ODBC3SQLFreeStmt:
+ case ODBC3SQLFunctionId::FreeStmt:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLFreeStmt);
break;
- case ODBC3SQLCloseCursor:
+ case ODBC3SQLFunctionId::CloseCursor:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLCloseCursor);
break;
- case ODBC3SQLCancel:
+ case ODBC3SQLFunctionId::Cancel:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLCancel);
break;
- case ODBC3SQLEndTran:
+ case ODBC3SQLFunctionId::EndTran:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLEndTran);
break;
- case ODBC3SQLDisconnect:
+ case ODBC3SQLFunctionId::Disconnect:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLDisconnect);
break;
- case ODBC3SQLFreeHandle:
+ case ODBC3SQLFunctionId::FreeHandle:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLFreeHandle);
break;
- case ODBC3SQLGetCursorName:
+ case ODBC3SQLFunctionId::GetCursorName:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLGetCursorName);
break;
- case ODBC3SQLNativeSql:
+ case ODBC3SQLFunctionId::NativeSql:
pFunction = reinterpret_cast<oslGenericFunction>(pODBC3SQLNativeSql);
break;
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 3d2a9f42eda3..722e09b4aa83 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -154,7 +154,7 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle ,OStatement_Base* pStmt) :
// We use SQLFetchScroll unconditionally in several places
// the *only* difference this makes is whether ::next() uses SQLFetchScroll or SQLFetch
// so this test seems pointless
- if ( getOdbcFunction(ODBC3SQLGetFunctions) )
+ if ( getOdbcFunction(ODBC3SQLFunctionId::GetFunctions) )
{
SQLUSMALLINT nSupported = 0;
m_bUseFetchScroll = ( N3SQLGetFunctions(m_aConnectionHandle,SQL_API_SQLFETCHSCROLL,&nSupported) == SQL_SUCCESS && nSupported == 1 );
@@ -847,7 +847,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException, st
&nRealLen
);
- bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) );
+ bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
if ( bPositionByBookmark )
{
nRet = N3SQLBulkOperations( m_aStatementHandle, SQL_ADD );
@@ -914,7 +914,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException, st
try
{
- bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLBulkOperations ) );
+ bool bPositionByBookmark = ( NULL != getOdbcFunction( ODBC3SQLFunctionId::BulkOperations ) );
if ( bPositionByBookmark )
{
getBookmark();
diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
index 1fb6dd38bb58..73d1e0920d27 100644
--- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
+++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
@@ -83,7 +83,7 @@ SQLLEN OResultSetMetaData::getNumColAttrib(OConnection* _pConnection
,sal_Int32 _ident) throw(SQLException, RuntimeException)
{
SQLLEN nValue=0;
- OTools::ThrowException(_pConnection,(*reinterpret_cast<T3SQLColAttribute>(_pConnection->getOdbcFunction(ODBC3SQLColAttribute)))(_aStatementHandle,
+ OTools::ThrowException(_pConnection,(*reinterpret_cast<T3SQLColAttribute>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::ColAttribute)))(_aStatementHandle,
(SQLUSMALLINT)_column,
(SQLUSMALLINT)_ident,
NULL,
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index d7ea63e939a1..db5eb179c4d0 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -139,7 +139,7 @@ void OTools::getValue( OConnection* _pConnection,
OSL_ENSURE(static_cast<size_t>(_nSize) >= properSize, "memory region is too small");
SQLLEN pcbValue = SQL_NULL_DATA;
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLGetData)))(_aStatementHandle,
+ (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetData)))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
_nType,
_pValue,
@@ -175,7 +175,7 @@ void OTools::bindValue( OConnection* _pConnection,
if (columnIndex != 0 && !_pValue)
{
*pLen = SQL_NULL_DATA;
- nRetcode = (*reinterpret_cast<T3SQLBindCol>(_pConnection->getOdbcFunction(ODBC3SQLBindCol)))(_aStatementHandle,
+ nRetcode = (*reinterpret_cast<T3SQLBindCol>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::BindCol)))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
fCType,
_pData,
@@ -276,7 +276,7 @@ void OTools::bindValue( OConnection* _pConnection,
{
}
- nRetcode = (*reinterpret_cast<T3SQLBindCol>(_pConnection->getOdbcFunction(ODBC3SQLBindCol)))(_aStatementHandle,
+ nRetcode = (*reinterpret_cast<T3SQLBindCol>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::BindCol)))(_aStatementHandle,
(SQLUSMALLINT)columnIndex,
fCType,
_pData,
@@ -329,7 +329,7 @@ void OTools::ThrowException(const OConnection* _pConnection,
// statements of this connection [what in this case will probably be the same, but the Reference
// Manual isn't totally clear in this...].
// corresponding for hdbc.
- SQLRETURN n = (*reinterpret_cast<T3SQLGetDiagRec>(_pConnection->getOdbcFunction(ODBC3SQLGetDiagRec)))(_nHandleType,_pContext,1,
+ SQLRETURN n = (*reinterpret_cast<T3SQLGetDiagRec>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetDiagRec)))(_nHandleType,_pContext,1,
szSqlState,
&pfNativeError,
szErrorMessage,sizeof szErrorMessage - 1,&pcbErrorMsg);
@@ -367,7 +367,7 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
while (pcbValue == SQL_NO_TOTAL || pcbValue > nMaxLen)
{
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLGetData)))(
+ (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetData)))(
_aStatementHandle,
(SQLUSMALLINT)columnIndex,
_fSqlType,
@@ -427,7 +427,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
while ((pcbValue == SQL_NO_TOTAL ) || (pcbValue >= nMaxSize) )
{
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLGetData)))(
+ (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetData)))(
_aStatementHandle,
(SQLUSMALLINT)columnIndex,
SQL_C_WCHAR,
@@ -471,7 +471,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
while ((pcbValue == SQL_NO_TOTAL ) || (pcbValue >= nMaxLen) )
{
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLGetData)))(
+ (*reinterpret_cast<T3SQLGetData>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetData)))(
_aStatementHandle,
(SQLUSMALLINT)columnIndex,
SQL_C_CHAR,
@@ -519,7 +519,7 @@ void OTools::GetInfo(OConnection* _pConnection,
char aValue[512];
SQLSMALLINT nValueLen=0;
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLGetInfo)))(_aConnectionHandle,_nInfo,aValue,(sizeof aValue)-1,&nValueLen),
+ (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(_aConnectionHandle,_nInfo,aValue,(sizeof aValue)-1,&nValueLen),
_aConnectionHandle,SQL_HANDLE_DBC,_xInterface);
_rValue = OUString(aValue,nValueLen,_nTextEncoding);
@@ -534,7 +534,7 @@ void OTools::GetInfo(OConnection* _pConnection,
SQLSMALLINT nValueLen;
_rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION)
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLGetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
+ (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
_aConnectionHandle,SQL_HANDLE_DBC,_xInterface);
}
@@ -547,7 +547,7 @@ void OTools::GetInfo(OConnection* _pConnection,
SQLSMALLINT nValueLen;
_rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION)
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLGetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
+ (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
_aConnectionHandle,SQL_HANDLE_DBC,_xInterface);
}
@@ -560,7 +560,7 @@ void OTools::GetInfo(OConnection* _pConnection,
SQLSMALLINT nValueLen;
_rValue = 0; // in case the driver uses only 16 of the 32 bits (as it does, for example, for SQL_CATALOG_LOCATION)
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLGetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
+ (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
_aConnectionHandle,SQL_HANDLE_DBC,_xInterface);
}
@@ -572,7 +572,7 @@ void OTools::GetInfo(OConnection* _pConnection,
{
SQLSMALLINT nValueLen;
OTools::ThrowException(_pConnection,
- (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLGetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
+ (*reinterpret_cast<T3SQLGetInfo>(_pConnection->getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(_aConnectionHandle,_nInfo,&_rValue,sizeof _rValue,&nValueLen),
_aConnectionHandle,SQL_HANDLE_DBC,_xInterface);
}
diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx
index dbf8f3772d85..1c5fe4030d4e 100644
--- a/connectivity/source/inc/odbc/OConnection.hxx
+++ b/connectivity/source/inc/odbc/OConnection.hxx
@@ -27,6 +27,7 @@
#include <connectivity/CommonTools.hxx>
#include "TConnection.hxx"
#include "OTypeInfo.hxx"
+#include "OTools.hxx"
#include <cppuhelper/weakref.hxx>
#include "AutoRetrievingBase.hxx"
#include <osl/module.h>
@@ -83,7 +84,7 @@ namespace connectivity
OConnection* cloneConnection(); // creates a new connection
public:
- oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const;
+ oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const;
SQLRETURN Construct( const OUString& url,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info) throw(::com::sun::star::sdbc::SQLException);
OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver);
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx
index f541dcb90978..2a63bb7187f1 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaData.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaData.hxx
@@ -61,7 +61,7 @@ namespace connectivity
public:
inline OConnection* getOwnConnection() const { return m_pConnection; }
- inline oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const
+ inline oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
return m_pConnection->getOdbcFunction(_nIndex);
}
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
index 08f307ec8c93..fee8093b4a7f 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
@@ -122,7 +122,7 @@ namespace connectivity
ODatabaseMetaDataResultSet(OConnection* _pConnection);
- inline oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const
+ inline oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
return m_pConnection->getOdbcFunction(_nIndex);
}
diff --git a/connectivity/source/inc/odbc/ODriver.hxx b/connectivity/source/inc/odbc/ODriver.hxx
index 1612e7fab913..d1709a8cc7dc 100644
--- a/connectivity/source/inc/odbc/ODriver.hxx
+++ b/connectivity/source/inc/odbc/ODriver.hxx
@@ -28,6 +28,7 @@
#include "odbc/odbcbasedllapi.hxx"
#include <connectivity/CommonTools.hxx>
#include <osl/module.h>
+#include "OTools.hxx"
namespace connectivity
{
@@ -54,7 +55,7 @@ namespace connectivity
ODBCDriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
// only possibility to get the odbc functions
- virtual oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const = 0;
+ virtual oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const = 0;
// OComponentHelper
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XInterface
diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx
index 677587e59cea..ff9eacac0f8c 100644
--- a/connectivity/source/inc/odbc/OFunctions.hxx
+++ b/connectivity/source/inc/odbc/OFunctions.hxx
@@ -34,11 +34,11 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
// Connecting to a data source
typedef SQLRETURN (SQL_API *T3SQLAllocHandle) (SQLSMALLINT HandleType,SQLHANDLE InputHandle,SQLHANDLE * OutputHandlePtr);
- #define N3SQLAllocHandle(a,b,c) (*reinterpret_cast<T3SQLAllocHandle>(getOdbcFunction(ODBC3SQLAllocHandle)))(a,b,c)
+ #define N3SQLAllocHandle(a,b,c) (*reinterpret_cast<T3SQLAllocHandle>(getOdbcFunction(ODBC3SQLFunctionId::AllocHandle)))(a,b,c)
typedef SQLRETURN (SQL_API *T3SQLConnect) (SQLHDBC ConnectionHandle,SQLCHAR *ServerName,SQLSMALLINT NameLength1,SQLCHAR *UserName,SQLSMALLINT NameLength2,SQLCHAR *Authentication,SQLSMALLINT NameLength3);
- #define N3SQLConnect(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLConnect>(getOdbcFunction(ODBC3SQLConnect)))(a,b,c,d,e,f,g)
+ #define N3SQLConnect(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLConnect>(getOdbcFunction(ODBC3SQLFunctionId::Connect)))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLDriverConnect) ( SQLHDBC ConnectionHandle,
HWND WindowHandle,
@@ -49,7 +49,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * StringLength2Ptr,
SQLUSMALLINT DriverCompletion);
- #define N3SQLDriverConnect(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDriverConnect>(getOdbcFunction(ODBC3SQLDriverConnect)))(a,b,c,d,e,f,g,h)
+ #define N3SQLDriverConnect(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDriverConnect>(getOdbcFunction(ODBC3SQLFunctionId::DriverConnect)))(a,b,c,d,e,f,g,h)
typedef SQLRETURN (SQL_API *T3SQLBrowseConnect) ( SQLHDBC ConnectionHandle,
SQLCHAR * InConnectionString,
@@ -58,7 +58,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT BufferLength,
SQLSMALLINT * StringLength2Ptr);
- #define N3SQLBrowseConnect(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBrowseConnect>(getOdbcFunction(ODBC3SQLBrowseConnect)))(a,b,c,d,e,f)
+ #define N3SQLBrowseConnect(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBrowseConnect>(getOdbcFunction(ODBC3SQLFunctionId::BrowseConnect)))(a,b,c,d,e,f)
// Obtaining information about a driver and data source
typedef SQLRETURN (SQL_API *T3SQLDataSources) ( SQLHENV EnvironmentHandle,
@@ -70,7 +70,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT BufferLength2,
SQLSMALLINT * NameLength2Ptr);
- #define N3SQLDataSources(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDataSources>(getOdbcFunction(ODBC3SQLDataSources)))(a,b,c,d,e,f,g,h)
+ #define N3SQLDataSources(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDataSources>(getOdbcFunction(ODBC3SQLFunctionId::DataSources)))(a,b,c,d,e,f,g,h)
typedef SQLRETURN (SQL_API *T3SQLDrivers) ( SQLHENV EnvironmentHandle,
SQLUSMALLINT Direction,
@@ -81,7 +81,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT BufferLength2,
SQLSMALLINT * AttributesLengthPtr);
- #define N3SQLDrivers(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDrivers>(getOdbcFunction(ODBC3SQLDrivers)))(a,b,c,d,e,f,g,h)
+ #define N3SQLDrivers(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLDrivers>(getOdbcFunction(ODBC3SQLFunctionId::Drivers)))(a,b,c,d,e,f,g,h)
typedef SQLRETURN (SQL_API *T3SQLGetInfo) ( SQLHDBC ConnectionHandle,
SQLUSMALLINT InfoType,
@@ -89,18 +89,18 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT BufferLength,
SQLSMALLINT * StringLengthPtr);
- #define N3SQLGetInfo(a,b,c,d,e) (*reinterpret_cast<T3SQLGetInfo>(getOdbcFunction(ODBC3SQLGetInfo)))(a,b,c,d,e)
+ #define N3SQLGetInfo(a,b,c,d,e) (*reinterpret_cast<T3SQLGetInfo>(getOdbcFunction(ODBC3SQLFunctionId::GetInfo)))(a,b,c,d,e)
typedef SQLRETURN (SQL_API *T3SQLGetFunctions) (SQLHDBC ConnectionHandle,
SQLUSMALLINT FunctionId,
SQLUSMALLINT * SupportedPtr);
- #define N3SQLGetFunctions(a,b,c) (*reinterpret_cast<T3SQLGetFunctions>(getOdbcFunction(ODBC3SQLGetFunctions)))(a,b,c)
+ #define N3SQLGetFunctions(a,b,c) (*reinterpret_cast<T3SQLGetFunctions>(getOdbcFunction(ODBC3SQLFunctionId::GetFunctions)))(a,b,c)
typedef SQLRETURN (SQL_API *T3SQLGetTypeInfo) ( SQLHSTMT StatementHandle,
SQLSMALLINT DataType);
- #define N3SQLGetTypeInfo(a,b) (*reinterpret_cast<T3SQLGetTypeInfo>(getOdbcFunction(ODBC3SQLGetTypeInfo)))(a,b)
+ #define N3SQLGetTypeInfo(a,b) (*reinterpret_cast<T3SQLGetTypeInfo>(getOdbcFunction(ODBC3SQLFunctionId::GetTypeInfo)))(a,b)
// Setting and retrieving driver attributes
typedef SQLRETURN (SQL_API *T3SQLSetConnectAttr)(SQLHDBC ConnectionHandle,
@@ -108,7 +108,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLPOINTER ValuePtr,
SQLINTEGER StringLength);
- #define N3SQLSetConnectAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetConnectAttr>(getOdbcFunction(ODBC3SQLSetConnectAttr)))(a,b,c,d)
+ #define N3SQLSetConnectAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetConnectAttr>(getOdbcFunction(ODBC3SQLFunctionId::SetConnectAttr)))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLGetConnectAttr) (SQLHDBC ConnectionHandle,
SQLINTEGER Attribute,
@@ -116,7 +116,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER* StringLength);
- #define N3SQLGetConnectAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetConnectAttr>(getOdbcFunction(ODBC3SQLGetConnectAttr)))(a,b,c,d,e)
+ #define N3SQLGetConnectAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetConnectAttr>(getOdbcFunction(ODBC3SQLFunctionId::GetConnectAttr)))(a,b,c,d,e)
typedef SQLRETURN (SQL_API *T3SQLSetEnvAttr) ( SQLHENV EnvironmentHandle,
@@ -124,7 +124,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLPOINTER ValuePtr,
SQLINTEGER StringLength);
- #define N3SQLSetEnvAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetEnvAttr>(getOdbcFunction(ODBC3SQLSetEnvAttr)))(a,b,c,d)
+ #define N3SQLSetEnvAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetEnvAttr>(getOdbcFunction(ODBC3SQLFunctionId::SetEnvAttr)))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLGetEnvAttr) ( SQLHENV EnvironmentHandle,
SQLINTEGER Attribute,
@@ -132,7 +132,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER* StringLength);
- #define N3SQLGetEnvAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetEnvAttr>(getOdbcFunction(ODBC3SQLGetEnvAttr)))(a,b,c,d,e)
+ #define N3SQLGetEnvAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetEnvAttr>(getOdbcFunction(ODBC3SQLFunctionId::GetEnvAttr)))(a,b,c,d,e)
typedef SQLRETURN (SQL_API *T3SQLSetStmtAttr) ( SQLHSTMT StatementHandle,
@@ -140,7 +140,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLPOINTER ValuePtr,
SQLINTEGER StringLength);
- #define N3SQLSetStmtAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetStmtAttr>(getOdbcFunction(ODBC3SQLSetStmtAttr)))(a,b,c,d)
+ #define N3SQLSetStmtAttr(a,b,c,d) (*reinterpret_cast<T3SQLSetStmtAttr>(getOdbcFunction(ODBC3SQLFunctionId::SetStmtAttr)))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLGetStmtAttr) ( SQLHSTMT StatementHandle,
SQLINTEGER Attribute,
@@ -148,7 +148,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER* StringLength);
- #define N3SQLGetStmtAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetStmtAttr>(getOdbcFunction(ODBC3SQLGetStmtAttr)))(a,b,c,d,e)
+ #define N3SQLGetStmtAttr(a,b,c,d,e) (*reinterpret_cast<T3SQLGetStmtAttr>(getOdbcFunction(ODBC3SQLFunctionId::GetStmtAttr)))(a,b,c,d,e)
// Setting and retrieving descriptor fields
/*typedef SQLRETURN (SQL_API *T3SQLSetDescField) (SQLHDESC DescriptorHandle,
@@ -157,7 +157,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLPOINTER ValuePtr,
SQLINTEGER BufferLength);
- #define N3SQLSetDescField(a,b,c,d,e) (*reinterpret_cast<T3SQLSetDescField>(getOdbcFunction(ODBC3SQLSetDescField)))(a,b,c,d,e)
+ #define N3SQLSetDescField(a,b,c,d,e) (*reinterpret_cast<T3SQLSetDescField>(getOdbcFunction(ODBC3SQLFunctionId::SetDescField)))(a,b,c,d,e)
typedef SQLRETURN (SQL_API *T3SQLGetDescField) ( SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber,
@@ -166,7 +166,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER * StringLengthPtr);
- #define N3SQLGetDescField(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetDescField>(getOdbcFunction(ODBC3SQLGetDescField)))(a,b,c,d,e,f)
+ #define N3SQLGetDescField(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetDescField>(getOdbcFunction(ODBC3SQLFunctionId::GetDescField)))(a,b,c,d,e,f)
typedef SQLRETURN (SQL_API *T3SQLGetDescRec) ( SQLHDESC DescriptorHandle,
@@ -181,7 +181,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * ScalePtr,
SQLSMALLINT * NullablePtr);
- #define N3SQLGetDescRec(a,b,c,d,e,f,g,h,i,j,k) (*reinterpret_cast<T3SQLGetDescRec>(getOdbcFunction(ODBC3SQLGetDescRec)))(a,b,c,d,e,f,g,h,i,j,k)
+ #define N3SQLGetDescRec(a,b,c,d,e,f,g,h,i,j,k) (*reinterpret_cast<T3SQLGetDescRec>(getOdbcFunction(ODBC3SQLFunctionId::GetDescRec)))(a,b,c,d,e,f,g,h,i,j,k)
typedef SQLRETURN (SQL_API *T3SQLSetDescRec) ( SQLHDESC DescriptorHandle,
@@ -195,7 +195,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLLEN * StringLengthPtr,
SQLLEN * IndicatorPtr);
- #define N3SQLSetDescRec(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSetDescRec>(getOdbcFunction(ODBC3SQLSetDescRec)))(a,b,c,d,e,f,g,h,i,j)
+ #define N3SQLSetDescRec(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSetDescRec>(getOdbcFunction(ODBC3SQLFunctionId::SetDescRec)))(a,b,c,d,e,f,g,h,i,j)
*/
// Preparing SQL requests
@@ -203,7 +203,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * StatementText,
SQLINTEGER TextLength);
- #define N3SQLPrepare(a,b,c) (*reinterpret_cast<T3SQLPrepare>(getOdbcFunction(ODBC3SQLPrepare)))(a,b,c)
+ #define N3SQLPrepare(a,b,c) (*reinterpret_cast<T3SQLPrepare>(getOdbcFunction(ODBC3SQLFunctionId::Prepare)))(a,b,c)
typedef SQLRETURN (SQL_API *T3SQLBindParameter) (SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber,
@@ -216,32 +216,32 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLLEN BufferLength,
SQLLEN * StrLen_or_IndPtr);
- #define N3SQLBindParameter(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLBindParameter>(getOdbcFunction(ODBC3SQLBindParameter)))(a,b,c,d,e,f,g,h,i,j)
+ #define N3SQLBindParameter(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLBindParameter>(getOdbcFunction(ODBC3SQLFunctionId::BindParameter)))(a,b,c,d,e,f,g,h,i,j)
/*typedef SQLRETURN (SQL_API *T3SQLGetCursorName) (SQLHSTMT StatementHandle,
SQLCHAR * CursorName,
SQLSMALLINT BufferLength,
SQLSMALLINT * NameLengthPtr);
- #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLGetCursorName)))(a,b,c,d)
+ #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLFunctionId::GetCursorName)))(a,b,c,d)
*/
typedef SQLRETURN (SQL_API *T3SQLSetCursorName) (SQLHSTMT StatementHandle,
SQLCHAR * CursorName,
SQLSMALLINT NameLength);
- #define N3SQLSetCursorName(a,b,c) (*reinterpret_cast<T3SQLSetCursorName>(getOdbcFunction(ODBC3SQLSetCursorName)))(a,b,c)
+ #define N3SQLSetCursorName(a,b,c) (*reinterpret_cast<T3SQLSetCursorName>(getOdbcFunction(ODBC3SQLFunctionId::SetCursorName)))(a,b,c)
// Submitting requests
typedef SQLRETURN (SQL_API *T3SQLExecute) ( SQLHSTMT StatementHandle);
- #define N3SQLExecute(a) (*reinterpret_cast<T3SQLExecute>(getOdbcFunction(ODBC3SQLExecute)))(a)
+ #define N3SQLExecute(a) (*reinterpret_cast<T3SQLExecute>(getOdbcFunction(ODBC3SQLFunctionId::Execute)))(a)
typedef SQLRETURN (SQL_API *T3SQLExecDirect) ( SQLHSTMT StatementHandle,
SQLCHAR * StatementText,
SQLINTEGER TextLength);
- #define N3SQLExecDirect(a,b,c) (*reinterpret_cast<T3SQLExecDirect>(getOdbcFunction(ODBC3SQLExecDirect)))(a,b,c)
+ #define N3SQLExecDirect(a,b,c) (*reinterpret_cast<T3SQLExecDirect>(getOdbcFunction(ODBC3SQLFunctionId::ExecDirect)))(a,b,c)
/*typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHDBC ConnectionHandle,
SQLCHAR * InStatementText,
@@ -250,7 +250,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER * TextLength2Ptr);
- #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLNativeSql)))(a,b,c,d,e,f)*/
+ #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLFunctionId::NativeSql)))(a,b,c,d,e,f)*/
typedef SQLRETURN (SQL_API *T3SQLDescribeParam) (SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber,
@@ -259,34 +259,34 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * DecimalDigitsPtr,
SQLSMALLINT * NullablePtr);
- #define N3SQLDescribeParam(a,b,c,d,e,f) (*reinterpret_cast<T3SQLDescribeParam>(getOdbcFunction(ODBC3SQLDescribeParam)))(a,b,c,d,e,f)
+ #define N3SQLDescribeParam(a,b,c,d,e,f) (*reinterpret_cast<T3SQLDescribeParam>(getOdbcFunction(ODBC3SQLFunctionId::DescribeParam)))(a,b,c,d,e,f)
typedef SQLRETURN (SQL_API *T3SQLNumParams) ( SQLHSTMT StatementHandle,
SQLSMALLINT * ParameterCountPtr);
- #define N3SQLNumParams(a,b) (*reinterpret_cast<T3SQLNumParams>(getOdbcFunction(ODBC3SQLNumParams)))(a,b)
+ #define N3SQLNumParams(a,b) (*reinterpret_cast<T3SQLNumParams>(getOdbcFunction(ODBC3SQLFunctionId::NumParams)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLParamData) ( SQLHSTMT StatementHandle,
SQLPOINTER * ValuePtrPtr);
- #define N3SQLParamData(a,b) (*reinterpret_cast<T3SQLParamData>(getOdbcFunction(ODBC3SQLParamData)))(a,b)
+ #define N3SQLParamData(a,b) (*reinterpret_cast<T3SQLParamData>(getOdbcFunction(ODBC3SQLFunctionId::ParamData)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLPutData) ( SQLHSTMT StatementHandle,
SQLPOINTER DataPtr,
SQLLEN StrLen_or_Ind);
- #define N3SQLPutData(a,b,c) (*reinterpret_cast<T3SQLPutData>(getOdbcFunction(ODBC3SQLPutData)))(a,b,c)
+ #define N3SQLPutData(a,b,c) (*reinterpret_cast<T3SQLPutData>(getOdbcFunction(ODBC3SQLFunctionId::PutData)))(a,b,c)
// Retrieving results and information about results
typedef SQLRETURN (SQL_API *T3SQLRowCount) ( SQLHSTMT StatementHandle,
SQLLEN * RowCountPtr);
- #define N3SQLRowCount(a,b) (*reinterpret_cast<T3SQLRowCount>(getOdbcFunction(ODBC3SQLRowCount)))(a,b)
+ #define N3SQLRowCount(a,b) (*reinterpret_cast<T3SQLRowCount>(getOdbcFunction(ODBC3SQLFunctionId::RowCount)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLNumResultCols) (SQLHSTMT StatementHandle,
SQLSMALLINT * ColumnCountPtr);
- #define N3SQLNumResultCols(a,b) (*reinterpret_cast<T3SQLNumResultCols>(getOdbcFunction(ODBC3SQLNumResultCols)))(a,b)
+ #define N3SQLNumResultCols(a,b) (*reinterpret_cast<T3SQLNumResultCols>(getOdbcFunction(ODBC3SQLFunctionId::NumResultCols)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLDescribeCol) ( SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
@@ -298,7 +298,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * DecimalDigitsPtr,
SQLSMALLINT * NullablePtr);
- #define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLDescribeCol>(getOdbcFunction(ODBC3SQLDescribeCol)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLDescribeCol(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLDescribeCol>(getOdbcFunction(ODBC3SQLFunctionId::DescribeCol)))(a,b,c,d,e,f,g,h,i)
typedef SQLRETURN (SQL_API *T3SQLColAttribute) (SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
@@ -308,7 +308,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * StringLengthPtr,
SQLLEN * NumericAttributePtr);
- #define N3SQLColAttribute(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLColAttribute>(getOdbcFunction(ODBC3SQLColAttribute)))(a,b,c,d,e,f,g)
+ #define N3SQLColAttribute(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLColAttribute>(getOdbcFunction(ODBC3SQLFunctionId::ColAttribute)))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLBindCol) ( SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
@@ -317,17 +317,17 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLLEN BufferLength,
SQLLEN * StrLen_or_IndPtr);
- #define N3SQLBindCol(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBindCol>(getOdbcFunction(ODBC3SQLBindCol)))(a,b,c,d,e,f)
+ #define N3SQLBindCol(a,b,c,d,e,f) (*reinterpret_cast<T3SQLBindCol>(getOdbcFunction(ODBC3SQLFunctionId::BindCol)))(a,b,c,d,e,f)
typedef SQLRETURN (SQL_API *T3SQLFetch) ( SQLHSTMT StatementHandle);
- #define N3SQLFetch(a) (*reinterpret_cast<T3SQLFetch>(getOdbcFunction(ODBC3SQLFetch)))(a)
+ #define N3SQLFetch(a) (*reinterpret_cast<T3SQLFetch>(getOdbcFunction(ODBC3SQLFunctionId::Fetch)))(a)
typedef SQLRETURN (SQL_API *T3SQLFetchScroll) ( SQLHSTMT StatementHandle,
SQLSMALLINT FetchOrientation,
SQLLEN FetchOffset);
- #define N3SQLFetchScroll(a,b,c) (*reinterpret_cast<T3SQLFetchScroll>(getOdbcFunction(ODBC3SQLFetchScroll)))(a,b,c)
+ #define N3SQLFetchScroll(a,b,c) (*reinterpret_cast<T3SQLFetchScroll>(getOdbcFunction(ODBC3SQLFunctionId::FetchScroll)))(a,b,c)
typedef SQLRETURN (SQL_API *T3SQLGetData) ( SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber,
@@ -336,23 +336,23 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLLEN BufferLength,
SQLLEN * StrLen_or_IndPtr);
- #define N3SQLGetData(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetData>(getOdbcFunction(ODBC3SQLGetData)))(a,b,c,d,e,f)
+ #define N3SQLGetData(a,b,c,d,e,f) (*reinterpret_cast<T3SQLGetData>(getOdbcFunction(ODBC3SQLFunctionId::GetData)))(a,b,c,d,e,f)
typedef SQLRETURN (SQL_API *T3SQLSetPos) ( SQLHSTMT StatementHandle,
SQLSETPOSIROW RowNumber,
SQLUSMALLINT Operation,
SQLUSMALLINT LockType);
- #define N3SQLSetPos(a,b,c,d) (*reinterpret_cast<T3SQLSetPos>(getOdbcFunction(ODBC3SQLSetPos)))(a,b,c,d)
+ #define N3SQLSetPos(a,b,c,d) (*reinterpret_cast<T3SQLSetPos>(getOdbcFunction(ODBC3SQLFunctionId::SetPos)))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLBulkOperations) ( SQLHSTMT StatementHandle,
SQLSMALLINT Operation);
- #define N3SQLBulkOperations(a,b) (*reinterpret_cast<T3SQLBulkOperations>(getOdbcFunction(ODBC3SQLBulkOperations)))(a,b)
+ #define N3SQLBulkOperations(a,b) (*reinterpret_cast<T3SQLBulkOperations>(getOdbcFunction(ODBC3SQLFunctionId::BulkOperations)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLMoreResults) ( SQLHSTMT StatementHandle);
- #define N3SQLMoreResults(a) (*reinterpret_cast<T3SQLMoreResults>(getOdbcFunction(ODBC3SQLMoreResults)))(a)
+ #define N3SQLMoreResults(a) (*reinterpret_cast<T3SQLMoreResults>(getOdbcFunction(ODBC3SQLFunctionId::MoreResults)))(a)
/*typedef SQLRETURN (SQL_API *T3SQLGetDiagField) (SQLSMALLINT HandleType,
SQLHANDLE Handle,
@@ -362,7 +362,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT BufferLength,
SQLSMALLINT * StringLengthPtr);
- #define N3SQLGetDiagField(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLGetDiagField>(getOdbcFunction(ODBC3SQLGetDiagField)))(a,b,c,d,e,f,g)*/
+ #define N3SQLGetDiagField(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLGetDiagField>(getOdbcFunction(ODBC3SQLFunctionId::GetDiagField)))(a,b,c,d,e,f,g)*/
typedef SQLRETURN (SQL_API *T3SQLGetDiagRec) ( SQLSMALLINT HandleType,
SQLHANDLE Handle,
@@ -374,7 +374,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLSMALLINT * TextLengthPtr);
- #define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLGetDiagRec>(getOdbcFunction(ODBC3SQLGetDiagRec)))(a,b,c,d,e,f,g,h)
+ #define N3SQLGetDiagRec(a,b,c,d,e,f,g,h) (*reinterpret_cast<T3SQLGetDiagRec>(getOdbcFunction(ODBC3SQLFunctionId::GetDiagRec)))(a,b,c,d,e,f,g,h)
// Obtaining information about the data source's system tables (catalog functions)
typedef SQLRETURN (SQL_API *T3SQLColumnPrivileges) (SQLHSTMT StatementHandle,
@@ -387,7 +387,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * ColumnName,
SQLSMALLINT NameLength4);
- #define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumnPrivileges>(getOdbcFunction(ODBC3SQLColumnPrivileges)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLColumnPrivileges(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumnPrivileges>(getOdbcFunction(ODBC3SQLFunctionId::ColumnPrivileges)))(a,b,c,d,e,f,g,h,i)
typedef SQLRETURN (SQL_API *T3SQLColumns) ( SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -399,7 +399,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * ColumnName,
SQLSMALLINT NameLength4);
- #define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumns>(getOdbcFunction(ODBC3SQLColumns)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLColumns>(getOdbcFunction(ODBC3SQLFunctionId::Columns)))(a,b,c,d,e,f,g,h,i)
typedef SQLRETURN (SQL_API *T3SQLForeignKeys) ( SQLHSTMT StatementHandle,
SQLCHAR * PKCatalogName,
@@ -415,7 +415,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * FKTableName,
SQLSMALLINT NameLength6);
- #define N3SQLForeignKeys(a,b,c,d,e,f,g,h,i,j,k,l,m) (*reinterpret_cast<T3SQLForeignKeys>(getOdbcFunction(ODBC3SQLForeignKeys)))(a,b,c,d,e,f,g,h,i,j,k,l,m)
+ #define N3SQLForeignKeys(a,b,c,d,e,f,g,h,i,j,k,l,m) (*reinterpret_cast<T3SQLForeignKeys>(getOdbcFunction(ODBC3SQLFunctionId::ForeignKeys)))(a,b,c,d,e,f,g,h,i,j,k,l,m)
typedef SQLRETURN (SQL_API *T3SQLPrimaryKeys) ( SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -425,7 +425,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * TableName,
SQLSMALLINT NameLength3);
- #define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLPrimaryKeys>(getOdbcFunction(ODBC3SQLPrimaryKeys)))(a,b,c,d,e,f,g)
+ #define N3SQLPrimaryKeys(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLPrimaryKeys>(getOdbcFunction(ODBC3SQLFunctionId::PrimaryKeys)))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLProcedureColumns) (SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -437,7 +437,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * ColumnName,
SQLSMALLINT NameLength4);
- #define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLProcedureColumns>(getOdbcFunction(ODBC3SQLProcedureColumns)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLProcedureColumns(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLProcedureColumns>(getOdbcFunction(ODBC3SQLFunctionId::ProcedureColumns)))(a,b,c,d,e,f,g,h,i)
typedef SQLRETURN (SQL_API *T3SQLProcedures) ( SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -447,7 +447,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * ProcName,
SQLSMALLINT NameLength3);
- #define N3SQLProcedures(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLProcedures>(getOdbcFunction(ODBC3SQLProcedures)))(a,b,c,d,e,f,g)
+ #define N3SQLProcedures(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLProcedures>(getOdbcFunction(ODBC3SQLFunctionId::Procedures)))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLSpecialColumns) (SQLHSTMT StatementHandle,
SQLUSMALLINT IdentifierType,
@@ -460,7 +460,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLUSMALLINT Scope,
SQLUSMALLINT Nullable);
- #define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSpecialColumns>(getOdbcFunction(ODBC3SQLSpecialColumns)))(a,b,c,d,e,f,g,h,i,j)
+ #define N3SQLSpecialColumns(a,b,c,d,e,f,g,h,i,j) (*reinterpret_cast<T3SQLSpecialColumns>(getOdbcFunction(ODBC3SQLFunctionId::SpecialColumns)))(a,b,c,d,e,f,g,h,i,j)
typedef SQLRETURN (SQL_API *T3SQLStatistics) ( SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -472,7 +472,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLUSMALLINT Unique,
SQLUSMALLINT Reserved);
- #define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLStatistics>(getOdbcFunction(ODBC3SQLStatistics)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLStatistics(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLStatistics>(getOdbcFunction(ODBC3SQLFunctionId::Statistics)))(a,b,c,d,e,f,g,h,i)
typedef SQLRETURN (SQL_API *T3SQLTablePrivileges) (SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -482,7 +482,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * TableName,
SQLSMALLINT NameLength3);
- #define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLTablePrivileges>(getOdbcFunction(ODBC3SQLTablePrivileges)))(a,b,c,d,e,f,g)
+ #define N3SQLTablePrivileges(a,b,c,d,e,f,g) (*reinterpret_cast<T3SQLTablePrivileges>(getOdbcFunction(ODBC3SQLFunctionId::TablePrivileges)))(a,b,c,d,e,f,g)
typedef SQLRETURN (SQL_API *T3SQLTables) ( SQLHSTMT StatementHandle,
SQLCHAR * CatalogName,
@@ -494,44 +494,44 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLCHAR * TableType,
SQLSMALLINT NameLength4);
- #define N3SQLTables(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLTables>(getOdbcFunction(ODBC3SQLTables)))(a,b,c,d,e,f,g,h,i)
+ #define N3SQLTables(a,b,c,d,e,f,g,h,i) (*reinterpret_cast<T3SQLTables>(getOdbcFunction(ODBC3SQLFunctionId::Tables)))(a,b,c,d,e,f,g,h,i)
// Terminating a statement
typedef SQLRETURN (SQL_API *T3SQLFreeStmt) ( SQLHSTMT StatementHandle,
SQLUSMALLINT Option);
- #define N3SQLFreeStmt(a,b) (*reinterpret_cast<T3SQLFreeStmt>(getOdbcFunction(ODBC3SQLFreeStmt)))(a,b)
+ #define N3SQLFreeStmt(a,b) (*reinterpret_cast<T3SQLFreeStmt>(getOdbcFunction(ODBC3SQLFunctionId::FreeStmt)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLCloseCursor) (SQLHSTMT StatementHandle);
- #define N3SQLCloseCursor(a) (*reinterpret_cast<T3SQLCloseCursor>(getOdbcFunction(ODBC3SQLCloseCursor)))(a)
+ #define N3SQLCloseCursor(a) (*reinterpret_cast<T3SQLCloseCursor>(getOdbcFunction(ODBC3SQLFunctionId::CloseCursor)))(a)
typedef SQLRETURN (SQL_API *T3SQLCancel) ( SQLHSTMT StatementHandle);
- #define N3SQLCancel(a) (*reinterpret_cast<T3SQLCancel>(getOdbcFunction(ODBC3SQLCancel)))(a)
+ #define N3SQLCancel(a) (*reinterpret_cast<T3SQLCancel>(getOdbcFunction(ODBC3SQLFunctionId::Cancel)))(a)
typedef SQLRETURN (SQL_API *T3SQLEndTran) ( SQLSMALLINT HandleType,
SQLHANDLE Handle,
SQLSMALLINT CompletionType);
- #define N3SQLEndTran(a,b,c) (*reinterpret_cast<T3SQLEndTran>(getOdbcFunction(ODBC3SQLEndTran)))(a,b,c)
+ #define N3SQLEndTran(a,b,c) (*reinterpret_cast<T3SQLEndTran>(getOdbcFunction(ODBC3SQLFunctionId::EndTran)))(a,b,c)
// Terminating a connection
typedef SQLRETURN (SQL_API *T3SQLDisconnect) (SQLHDBC ConnectionHandle);
- #define N3SQLDisconnect(a) (*reinterpret_cast<T3SQLDisconnect>(getOdbcFunction(ODBC3SQLDisconnect)))(a)
+ #define N3SQLDisconnect(a) (*reinterpret_cast<T3SQLDisconnect>(getOdbcFunction(ODBC3SQLFunctionId::Disconnect)))(a)
typedef SQLRETURN (SQL_API *T3SQLFreeHandle) (SQLSMALLINT HandleType,
SQLHANDLE Handle);
- #define N3SQLFreeHandle(a,b) (*reinterpret_cast<T3SQLFreeHandle>(getOdbcFunction(ODBC3SQLFreeHandle)))(a,b)
+ #define N3SQLFreeHandle(a,b) (*reinterpret_cast<T3SQLFreeHandle>(getOdbcFunction(ODBC3SQLFunctionId::FreeHandle)))(a,b)
typedef SQLRETURN (SQL_API *T3SQLGetCursorName) ( SQLHSTMT StatementHandle,
SQLCHAR * CursorName,
SQLSMALLINT BufferLength,
SQLSMALLINT* NameLength2);
- #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLGetCursorName)))(a,b,c,d)
+ #define N3SQLGetCursorName(a,b,c,d) (*reinterpret_cast<T3SQLGetCursorName>(getOdbcFunction(ODBC3SQLFunctionId::GetCursorName)))(a,b,c,d)
typedef SQLRETURN (SQL_API *T3SQLNativeSql) ( SQLHSTMT ConnectionHandle,
SQLCHAR * InStatementText,
@@ -540,7 +540,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath);
SQLINTEGER BufferLength,
SQLINTEGER * TextLength2Ptr);
- #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLNativeSql)))(a,b,c,d,e,f)
+ #define N3SQLNativeSql(a,b,c,d,e,f) (*reinterpret_cast<T3SQLNativeSql>(getOdbcFunction(ODBC3SQLFunctionId::NativeSql)))(a,b,c,d,e,f)
}
#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONS_HXX
diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx
index f7dda14b73fa..d1779d6ddfe4 100644
--- a/connectivity/source/inc/odbc/OResultSet.hxx
+++ b/connectivity/source/inc/odbc/OResultSet.hxx
@@ -221,7 +221,7 @@ namespace connectivity
void construct();
- inline oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const
+ inline oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
return m_pStatement->getOdbcFunction(_nIndex);
}
diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
index 7a744acb8ed3..f6fc037398d1 100644
--- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx
+++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
@@ -80,7 +80,7 @@ namespace connectivity
,sal_Int32 column)
throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- inline oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const
+ inline oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
return m_pConnection->getOdbcFunction(_nIndex);
}
diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx
index 9a8297a35f7d..975eb0b5f60a 100644
--- a/connectivity/source/inc/odbc/OStatement.hxx
+++ b/connectivity/source/inc/odbc/OStatement.hxx
@@ -152,7 +152,7 @@ namespace connectivity
OStatement_Base(OConnection* _pConnection );
using OStatement_BASE::operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >;
- inline oslGenericFunction getOdbcFunction(sal_Int32 _nIndex) const
+ inline oslGenericFunction getOdbcFunction(ODBC3SQLFunctionId _nIndex) const
{
return m_pConnection->getOdbcFunction(_nIndex);
}
diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx
index ff07cd069280..c971548e59f3 100644
--- a/connectivity/source/inc/odbc/OTools.hxx
+++ b/connectivity/source/inc/odbc/OTools.hxx
@@ -30,60 +30,63 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/textenc.h>
-#define ODBC3SQLAllocHandle 1
-#define ODBC3SQLConnect 2
-#define ODBC3SQLDriverConnect 3
-#define ODBC3SQLBrowseConnect 4
-#define ODBC3SQLDataSources 5
-#define ODBC3SQLDrivers 6
-#define ODBC3SQLGetInfo 7
-#define ODBC3SQLGetFunctions 8
-#define ODBC3SQLGetTypeInfo 9
-#define ODBC3SQLSetConnectAttr 10
-#define ODBC3SQLGetConnectAttr 11
-#define ODBC3SQLSetEnvAttr 12
-#define ODBC3SQLGetEnvAttr 13
-#define ODBC3SQLSetStmtAttr 14
-#define ODBC3SQLGetStmtAttr 15
-#define ODBC3SQLPrepare 16
-#define ODBC3SQLBindParameter 17
-#define ODBC3SQLSetCursorName 18
-#define ODBC3SQLExecute 19
-#define ODBC3SQLExecDirect 20
-#define ODBC3SQLDescribeParam 21
-#define ODBC3SQLNumParams 22
-#define ODBC3SQLParamData 23
-#define ODBC3SQLPutData 24
-#define ODBC3SQLRowCount 25
-#define ODBC3SQLNumResultCols 26
-#define ODBC3SQLDescribeCol 27
-#define ODBC3SQLColAttribute 28
-#define ODBC3SQLBindCol 29
-#define ODBC3SQLFetch 30
-#define ODBC3SQLFetchScroll 31
-#define ODBC3SQLGetData 32
-#define ODBC3SQLSetPos 33
-#define ODBC3SQLBulkOperations 34
-#define ODBC3SQLMoreResults 35
-#define ODBC3SQLGetDiagRec 36
-#define ODBC3SQLColumnPrivileges 37
-#define ODBC3SQLColumns 38
-#define ODBC3SQLForeignKeys 39
-#define ODBC3SQLPrimaryKeys 40
-#define ODBC3SQLProcedureColumns 41
-#define ODBC3SQLProcedures 42
-#define ODBC3SQLSpecialColumns 43
-#define ODBC3SQLStatistics 44
-#define ODBC3SQLTablePrivileges 45
-#define ODBC3SQLTables 46
-#define ODBC3SQLFreeStmt 47
-#define ODBC3SQLCloseCursor 48
-#define ODBC3SQLCancel 49
-#define ODBC3SQLEndTran 50
-#define ODBC3SQLDisconnect 51
-#define ODBC3SQLFreeHandle 52
-#define ODBC3SQLGetCursorName 53
-#define ODBC3SQLNativeSql 54
+enum class ODBC3SQLFunctionId
+{
+ AllocHandle = 1,
+ Connect = 2,
+ DriverConnect = 3,
+ BrowseConnect = 4,
+ DataSources = 5,
+ Drivers = 6,
+ GetInfo = 7,
+ GetFunctions = 8,
+ GetTypeInfo = 9,
+ SetConnectAttr = 10,
+ GetConnectAttr = 11,
+ SetEnvAttr = 12,
+ GetEnvAttr = 13,
+ SetStmtAttr = 14,
+ GetStmtAttr = 15,
+ Prepare = 16,
+ BindParameter = 17,
+ SetCursorName = 18,
+ Execute = 19,
+ ExecDirect = 20,
+ DescribeParam = 21,
+ NumParams = 22,
+ ParamData = 23,
+ PutData = 24,
+ RowCount = 25,
+ NumResultCols = 26,
+ DescribeCol = 27,
+ ColAttribute = 28,
+ BindCol = 29,
+ Fetch = 30,
+ FetchScroll = 31,
+ GetData = 32,
+ SetPos = 33,
+ BulkOperations = 34,
+ MoreResults = 35,
+ GetDiagRec = 36,
+ ColumnPrivileges = 37,
+ Columns = 38,
+ ForeignKeys = 39,
+ PrimaryKeys = 40,
+ ProcedureColumns = 41,
+ Procedures = 42,
+ SpecialColumns = 43,
+ Statistics = 44,
+ TablePrivileges = 45,
+ Tables = 46,
+ FreeStmt = 47,
+ CloseCursor = 48,
+ Cancel = 49,
+ EndTran = 50,
+ Disconnect = 51,
+ FreeHandle = 52,
+ GetCursorName = 53,
+ NativeSql = 54,
+};
namespace connectivity
{