summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-01-25 00:57:51 +0200
committerTor Lillqvist <tlillqvist@novell.com>2011-01-25 00:58:03 +0200
commit834e0e49d315ca05d4b086295a36e4adaccf1f2c (patch)
treef3cacb973ad8c113dfef8155e7adfeb89109595e
parent7a48a6c87ffdc8d11a758205bdd6e67c990e88ed (diff)
Use correct parameter types in ADO API calls
Fixes compilation errors on 64-bit Windows.
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx2
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx6
-rw-r--r--connectivity/source/drivers/ado/Awrapado.cxx14
-rw-r--r--connectivity/source/inc/ado/AResultSet.hxx2
-rw-r--r--connectivity/source/inc/ado/AStatement.hxx2
-rw-r--r--connectivity/source/inc/ado/Awrapado.hxx8
6 files changed, 17 insertions, 17 deletions
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index 991b4c2cfb4e..feb6074eff61 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -279,7 +279,7 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- PositionEnum aPos;
+ PositionEnum_Param aPos;
m_pRecordSet->get_AbsolutePosition(&aPos);
return (aPos > 0) ? aPos : m_nRowPos;
// return the rowcount from driver if the driver doesn't support this return our count
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index 22be6b07e888..efb6735c318d 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -390,7 +390,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( ) throw(SQLException,
{
assignRecordSet( pSet );
- sal_Int32 nValue;
+ ADO_LONGPTR nValue;
if(m_RecordSet.get_RecordCount(nValue))
pArray[j] = nValue;
}
@@ -443,7 +443,7 @@ sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( ) throw(SQLException, Runti
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- sal_Int32 nRet;
+ ADO_LONGPTR nRet;
if(m_RecordSet.IsValid() && m_RecordSet.get_RecordCount(nRet))
return nRet;
return -1;
@@ -512,7 +512,7 @@ sal_Int32 OStatement_Base::getQueryTimeOut() const throw(SQLException, RuntimeE
//------------------------------------------------------------------------------
sal_Int32 OStatement_Base::getMaxRows() const throw(SQLException, RuntimeException)
{
- sal_Int32 nRet=-1;
+ ADO_LONGPTR nRet=-1;
if(!(m_RecordSet.IsValid() && m_RecordSet.get_MaxRecords(nRet)))
::dbtools::throwFunctionSequenceException(NULL);
return nRet;
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index fa8dc5739029..b2d96c17aa6d 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -485,7 +485,7 @@ WpADOProperties WpADOField::get_Properties()
sal_Int32 WpADOField::GetActualSize() const
{
OSL_ENSURE(pInterface,"Interface is null!");
- sal_Int32 nActualSize=0;
+ ADO_LONGPTR nActualSize=0;
pInterface->get_ActualSize(&nActualSize);
return nActualSize;
}
@@ -509,7 +509,7 @@ sal_Int32 WpADOField::GetStatus() const
sal_Int32 WpADOField::GetDefinedSize() const
{
OSL_ENSURE(pInterface,"Interface is null!");
- sal_Int32 nDefinedSize=0;
+ ADO_LONGPTR nDefinedSize=0;
pInterface->get_DefinedSize(&nDefinedSize);
return nDefinedSize;
}
@@ -776,10 +776,10 @@ void WpADORecordset::Close()
return bSupports == VARIANT_TRUE;
}
-PositionEnum WpADORecordset::get_AbsolutePosition()
+PositionEnum_Param WpADORecordset::get_AbsolutePosition()
{
OSL_ENSURE(pInterface,"Interface is null!");
- PositionEnum aTemp=adPosUnknown;
+ PositionEnum_Param aTemp=adPosUnknown;
pInterface->get_AbsolutePosition(&aTemp);
return aTemp;
}
@@ -898,19 +898,19 @@ WpADOProperties WpADORecordset::get_Properties() const
return SUCCEEDED(pInterface->NextRecordset(&RecordsAffected,ppiRset));
}
- sal_Bool WpADORecordset::get_RecordCount(sal_Int32 &_nRet) const
+ sal_Bool WpADORecordset::get_RecordCount(ADO_LONGPTR &_nRet) const
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->get_RecordCount(&_nRet));
}
- sal_Bool WpADORecordset::get_MaxRecords(sal_Int32 &_nRet) const
+ sal_Bool WpADORecordset::get_MaxRecords(ADO_LONGPTR &_nRet) const
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->get_MaxRecords(&_nRet));
}
- sal_Bool WpADORecordset::put_MaxRecords(sal_Int32 _nRet)
+ sal_Bool WpADORecordset::put_MaxRecords(ADO_LONGPTR _nRet)
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->put_MaxRecords(_nRet));
diff --git a/connectivity/source/inc/ado/AResultSet.hxx b/connectivity/source/inc/ado/AResultSet.hxx
index 3f16d080d83a..29dc7b7a4bbc 100644
--- a/connectivity/source/inc/ado/AResultSet.hxx
+++ b/connectivity/source/inc/ado/AResultSet.hxx
@@ -79,7 +79,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData> m_xMetaData;
::std::vector<OLEVariant> m_aBookmarks;
OLEVariant m_aValue;
- sal_Int32 m_nRowPos;
+ ADO_LONGPTR m_nRowPos;
sal_Bool m_bWasNull;
sal_Bool m_bEOF;
sal_Bool m_bOnFirstAfterOpen;
diff --git a/connectivity/source/inc/ado/AStatement.hxx b/connectivity/source/inc/ado/AStatement.hxx
index 0f04f00a73a6..baaa21ec5e78 100644
--- a/connectivity/source/inc/ado/AStatement.hxx
+++ b/connectivity/source/inc/ado/AStatement.hxx
@@ -86,7 +86,7 @@ namespace connectivity
::std::vector<connectivity::OTypeInfo> m_aTypeInfo; // Hashtable containing an entry
// for each row returned by
// DatabaseMetaData.getTypeInfo.
- sal_Int32 m_nMaxRows;
+ ADO_LONGPTR m_nMaxRows;
sal_Int32 m_nFetchSize;
LockTypeEnum m_eLockType;
CursorTypeEnum m_eCursorType;
diff --git a/connectivity/source/inc/ado/Awrapado.hxx b/connectivity/source/inc/ado/Awrapado.hxx
index 10476e790ca5..ad684d307ba4 100644
--- a/connectivity/source/inc/ado/Awrapado.hxx
+++ b/connectivity/source/inc/ado/Awrapado.hxx
@@ -336,7 +336,7 @@ namespace connectivity
sal_Bool Cancel() const;
sal_Int32 get_State( );
sal_Bool Supports( /* [in] */ CursorOptionEnum CursorOptions);
- PositionEnum get_AbsolutePosition();
+ PositionEnum_Param get_AbsolutePosition();
void GetDataSource(IUnknown** pIUnknown) const ;
void PutRefDataSource(IUnknown* pIUnknown);
void GetBookmark(VARIANT& var);
@@ -358,9 +358,9 @@ namespace connectivity
sal_Bool CancelUpdate();
WpADOProperties get_Properties() const;
sal_Bool NextRecordset(OLEVariant& RecordsAffected,ADORecordset** ppiRset);
- sal_Bool get_RecordCount(sal_Int32 &_nRet) const;
- sal_Bool get_MaxRecords(sal_Int32 &_nRet) const;
- sal_Bool put_MaxRecords(sal_Int32 _nRet);
+ sal_Bool get_RecordCount(ADO_LONGPTR &_nRet) const;
+ sal_Bool get_MaxRecords(ADO_LONGPTR &_nRet) const;
+ sal_Bool put_MaxRecords(ADO_LONGPTR _nRet);
sal_Bool get_CursorType(CursorTypeEnum &_nRet) const;
sal_Bool put_CursorType(CursorTypeEnum _nRet);
sal_Bool get_LockType(LockTypeEnum &_nRet) const;