#86528# size changes
This commit is contained in:
parent
98b43366d5
commit
367e22c381
25 changed files with 485 additions and 825 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: CResultSet.cxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:40:01 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -131,8 +131,8 @@ Any SAL_CALL OCalcResultSet::queryInterface( const Type & rType ) throw(RuntimeE
|
|||
Any SAL_CALL OCalcResultSet::getBookmark( ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return makeAny((sal_Int32)(*m_aRow)[0]);
|
||||
}
|
||||
|
@ -140,8 +140,8 @@ Any SAL_CALL OCalcResultSet::getBookmark( ) throw( SQLException, RuntimeExcept
|
|||
sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -151,8 +151,8 @@ sal_Bool SAL_CALL OCalcResultSet::moveToBookmark( const Any& bookmark ) throw(
|
|||
sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -163,8 +163,8 @@ sal_Bool SAL_CALL OCalcResultSet::moveRelativeToBookmark( const Any& bookmark,
|
|||
sal_Int32 SAL_CALL OCalcResultSet::compareBookmarks( const Any& first, const Any& second ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return (first == second) ? 0 : 2;
|
||||
}
|
||||
|
@ -177,8 +177,8 @@ sal_Bool SAL_CALL OCalcResultSet::hasOrderedBookmarks( ) throw( SQLException,
|
|||
sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return connectivity::getINT32(bookmark);
|
||||
}
|
||||
|
@ -187,8 +187,8 @@ sal_Int32 SAL_CALL OCalcResultSet::hashBookmark( const Any& bookmark ) throw( S
|
|||
Sequence< sal_Int32 > SAL_CALL OCalcResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return Sequence< sal_Int32 >();
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: DConnection.cxx,v $
|
||||
*
|
||||
* $Revision: 1.7 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-27 10:08:09 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -119,8 +119,8 @@ IMPLEMENT_SERVICE_INFO(ODbaseConnection, "com.sun.star.sdbc.drivers.dbase.Connec
|
|||
Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
|
||||
if(!xMetaData.is())
|
||||
|
@ -148,8 +148,8 @@ Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw(
|
|||
Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XStatement > xReturn = new ODbaseStatement(this);
|
||||
m_aStatements.push_back(WeakReferenceHelper(xReturn));
|
||||
|
@ -159,10 +159,10 @@ Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQL
|
|||
Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
ODbasePreparedStatement* pStmt = new ODbasePreparedStatement(this,m_aTypeInfo);
|
||||
|
||||
ODbasePreparedStatement* pStmt = new ODbasePreparedStatement(this);
|
||||
Reference< XPreparedStatement > xHoldAlive = pStmt;
|
||||
pStmt->construct(sql);
|
||||
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
|
||||
|
@ -172,9 +172,11 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con
|
|||
Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: DResultSet.cxx,v $
|
||||
*
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:37:37 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -140,8 +140,8 @@ Any SAL_CALL ODbaseResultSet::queryInterface( const Type & rType ) throw(Runtime
|
|||
Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return makeAny((sal_Int32)(*m_aRow)[0]);
|
||||
}
|
||||
|
@ -149,8 +149,8 @@ Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeExcep
|
|||
sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -160,8 +160,8 @@ sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw(
|
|||
sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -172,8 +172,8 @@ sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark,
|
|||
sal_Int32 SAL_CALL ODbaseResultSet::compareBookmarks( const Any& first, const Any& second ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
sal_Int32 nFirst,nSecond,nResult;
|
||||
first >>= nFirst;
|
||||
|
@ -199,8 +199,8 @@ sal_Bool SAL_CALL ODbaseResultSet::hasOrderedBookmarks( ) throw( SQLException,
|
|||
sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return connectivity::getINT32(bookmark);
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw(
|
|||
Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return Sequence< sal_Int32 >();
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: DTable.cxx,v $
|
||||
*
|
||||
* $Revision: 1.44 $
|
||||
* $Revision: 1.45 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:37:37 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1911,8 +1911,8 @@ BOOL ODbaseTable::WriteBuffer()
|
|||
void SAL_CALL ODbaseTable::alterColumnByName( const ::rtl::OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
if (OTableDescriptor_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference<XDataDescriptorFactory> xOldColumn;
|
||||
m_pColumns->getByName(colName) >>= xOldColumn;
|
||||
|
@ -1923,8 +1923,8 @@ void SAL_CALL ODbaseTable::alterColumnByName( const ::rtl::OUString& colName, co
|
|||
void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
if (OTableDescriptor_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(index < 0 || index >= m_pColumns->getCount())
|
||||
throw IndexOutOfBoundsException(::rtl::OUString::valueOf(index),*this);
|
||||
|
||||
|
@ -2025,8 +2025,8 @@ void ODbaseTable::alterColumn(sal_Int32 index,
|
|||
void SAL_CALL ODbaseTable::rename( const ::rtl::OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
if (OTableDescriptor_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
FileClose();
|
||||
String aName = getEntry();
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FConnection.cxx,v $
|
||||
*
|
||||
* $Revision: 1.25 $
|
||||
* $Revision: 1.26 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:51:37 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:53 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -294,8 +294,8 @@ IMPLEMENT_SERVICE_INFO(OConnection, "com.sun.star.sdbc.drivers.file.Connection",
|
|||
Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XStatement > xReturn = new OStatement(this);
|
||||
m_aStatements.push_back(WeakReferenceHelper(xReturn));
|
||||
|
@ -305,10 +305,10 @@ Reference< XStatement > SAL_CALL OConnection::createStatement( ) throw(SQLExcep
|
|||
Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
OPreparedStatement* pStmt = new OPreparedStatement(this,m_aTypeInfo);
|
||||
|
||||
OPreparedStatement* pStmt = new OPreparedStatement(this);
|
||||
Reference< XPreparedStatement > xHoldAlive = pStmt;
|
||||
pStmt->construct(sql);
|
||||
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
|
||||
|
@ -318,8 +318,8 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareStatement( const ::
|
|||
Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
// --------------------------------------------------------------------------------
|
||||
|
@ -333,8 +333,8 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const ::rtl::
|
|||
void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bAutoCommit = autoCommit;
|
||||
}
|
||||
|
@ -342,8 +342,8 @@ void SAL_CALL OConnection::setAutoCommit( sal_Bool autoCommit ) throw(SQLExcepti
|
|||
sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bAutoCommit;
|
||||
}
|
||||
|
@ -351,8 +351,8 @@ sal_Bool SAL_CALL OConnection::getAutoCommit( ) throw(SQLException, RuntimeExce
|
|||
void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -360,8 +360,8 @@ void SAL_CALL OConnection::commit( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OConnection::rollback( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -376,8 +376,8 @@ sal_Bool SAL_CALL OConnection::isClosed( ) throw(SQLException, RuntimeException
|
|||
Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
|
||||
if(!xMetaData.is())
|
||||
|
@ -392,8 +392,8 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx
|
|||
void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bReadOnly = readOnly;
|
||||
}
|
||||
|
@ -401,8 +401,8 @@ void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException,
|
|||
sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bReadOnly;
|
||||
}
|
||||
|
@ -410,15 +410,15 @@ sal_Bool SAL_CALL OConnection::isReadOnly( ) throw(SQLException, RuntimeExcepti
|
|||
void SAL_CALL OConnection::setCatalog( const ::rtl::OUString& catalog ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
}
|
||||
// --------------------------------------------------------------------------------
|
||||
::rtl::OUString SAL_CALL OConnection::getCatalog( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return ::rtl::OUString();
|
||||
}
|
||||
|
@ -426,16 +426,16 @@ void SAL_CALL OConnection::setCatalog( const ::rtl::OUString& catalog ) throw(SQ
|
|||
void SAL_CALL OConnection::setTransactionIsolation( sal_Int32 level ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
}
|
||||
// --------------------------------------------------------------------------------
|
||||
sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -443,8 +443,8 @@ sal_Int32 SAL_CALL OConnection::getTransactionIsolation( ) throw(SQLException,
|
|||
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getTypeMap( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -458,8 +458,8 @@ void SAL_CALL OConnection::close( ) throw(SQLException, RuntimeException)
|
|||
{
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
|
||||
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FPreparedStatement.cxx,v $
|
||||
*
|
||||
* $Revision: 1.16 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:37:36 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:53 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -106,7 +106,7 @@ using namespace com::sun::star::util;
|
|||
|
||||
IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbc.driver.file.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
|
||||
|
||||
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const ::std::vector<OTypeInfo>& _TypeInfo)
|
||||
OPreparedStatement::OPreparedStatement( OConnection* _pConnection)
|
||||
: OStatement_BASE2( _pConnection )
|
||||
,m_pResultSet(NULL)
|
||||
,m_pTable(NULL)
|
||||
|
@ -187,8 +187,8 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt
|
|||
Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(!m_xMetaData.is())
|
||||
m_xMetaData = new OResultSetMetaData(m_aSQLIterator.getSelectColumns(),m_aSQLIterator.getTables().begin()->first,m_pTable);
|
||||
|
@ -199,8 +199,8 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr
|
|||
void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
clearMyResultSet();
|
||||
}
|
||||
|
@ -209,8 +209,8 @@ void SAL_CALL OPreparedStatement::close( ) throw(SQLException, RuntimeException
|
|||
sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > rs = initResultSet();
|
||||
|
||||
|
@ -221,8 +221,8 @@ sal_Bool SAL_CALL OPreparedStatement::execute( ) throw(SQLException, RuntimeExc
|
|||
sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > rs = initResultSet();
|
||||
return m_pResultSet ? m_pResultSet->getRowCountResult() : sal_Int32(0);
|
||||
|
@ -232,8 +232,8 @@ sal_Int32 SAL_CALL OPreparedStatement::executeUpdate( ) throw(SQLException, Run
|
|||
void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -247,8 +247,8 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::r
|
|||
Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return (Reference< XConnection >)m_pConnection;
|
||||
}
|
||||
|
@ -257,8 +257,8 @@ Reference< XConnection > SAL_CALL OPreparedStatement::getConnection( ) throw(SQ
|
|||
Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > rs = initResultSet();
|
||||
return rs;
|
||||
|
@ -268,8 +268,8 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE
|
|||
void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -282,8 +282,8 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
|
|||
void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -297,8 +297,8 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
|
|||
void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -313,8 +313,8 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
|
|||
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -328,8 +328,8 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time&
|
|||
void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -343,8 +343,8 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
|
|||
void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -359,8 +359,8 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
|
|||
void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -374,8 +374,8 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
|
|||
void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -389,8 +389,8 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
|
|||
void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -398,8 +398,8 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 a
|
|||
void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
// Get the buffer needed for the length
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -414,8 +414,8 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
|
|||
void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -423,8 +423,8 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
|
|||
void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -432,8 +432,8 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
|
|||
void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -441,8 +441,8 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
|
|||
void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -450,8 +450,8 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
|
|||
void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
// For each known SQL Type, call the appropriate
|
||||
|
@ -514,8 +514,8 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
|
|||
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -529,8 +529,8 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
|
|||
void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
// setObject (parameterIndex, x, sqlType, 0);
|
||||
}
|
||||
|
@ -539,8 +539,8 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
|
|||
void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
if( parameterIndex < 1)
|
||||
throwInvalidIndexException(*this);
|
||||
setInt(parameterIndex,x);
|
||||
|
@ -550,8 +550,8 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
|
|||
void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -560,8 +560,8 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
|
|||
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -569,8 +569,8 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
|
|||
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
throwInvalidIndexException(*this);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -578,8 +578,8 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con
|
|||
void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
m_aRow->clear();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FResultSet.cxx,v $
|
||||
*
|
||||
* $Revision: 1.53 $
|
||||
* $Revision: 1.54 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:51:37 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:53 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -269,14 +269,19 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep
|
|||
sal_Int32 SAL_CALL OResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSetMetaData > xMeta = getMetaData();
|
||||
sal_Int32 nLen = xMeta->getColumnCount();
|
||||
sal_Int32 i = 1;
|
||||
for(;i<=nLen;++i)
|
||||
if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) : columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i)))
|
||||
if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) :
|
||||
#if SUPD > 630
|
||||
columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i)))
|
||||
#else
|
||||
columnName.equalsIgnoreCase(xMeta->getColumnName(i)))
|
||||
#endif
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
|
@ -284,8 +289,8 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const ::rtl::OUString& columnName ) t
|
|||
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -296,8 +301,8 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getBinarySt
|
|||
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -309,8 +314,8 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OResultSet::getCharacte
|
|||
sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -323,8 +328,8 @@ sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLExcep
|
|||
sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -337,8 +342,8 @@ sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLExceptio
|
|||
Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -359,8 +364,8 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro
|
|||
::com::sun::star::util::Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -374,8 +379,8 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex ) thro
|
|||
double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -388,8 +393,8 @@ double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLExceptio
|
|||
float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -402,8 +407,8 @@ float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException,
|
|||
sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -416,8 +421,8 @@ sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLExceptio
|
|||
sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
sal_Int32 nPos = (sal_Int32)(*m_aRow)[0];
|
||||
::std::map<sal_Int32,sal_Int32>::const_iterator aFind = m_aBookmarks.find(nPos);
|
||||
OSL_ENSURE(aFind != m_aBookmarks.end(),"OResultSet::getRow() invalid bookmark!");
|
||||
|
@ -432,8 +437,8 @@ sal_Int32 SAL_CALL OResultSet::getRow( ) throw(SQLException, RuntimeException)
|
|||
sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
||||
|
@ -445,8 +450,8 @@ sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 columnIndex ) throw(SQLExcepti
|
|||
Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(!m_xMetaData.is())
|
||||
m_xMetaData = new OResultSetMetaData(m_xColumns,m_aSQLIterator.getTables().begin()->first,m_pTable);
|
||||
|
@ -456,8 +461,8 @@ Reference< XResultSetMetaData > SAL_CALL OResultSet::getMetaData( ) throw(SQLEx
|
|||
Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -470,8 +475,8 @@ Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 columnIndex ) throw
|
|||
Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -482,8 +487,8 @@ Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 columnIndex ) throw(S
|
|||
Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -495,8 +500,8 @@ Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 columnIndex ) throw(S
|
|||
Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -508,8 +513,8 @@ Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 columnIndex ) throw(SQL
|
|||
Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
return Any();
|
||||
|
@ -519,8 +524,8 @@ Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< ::co
|
|||
sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -534,8 +539,8 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
|
|||
::rtl::OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -550,8 +555,8 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
|
|||
::com::sun::star::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -565,8 +570,8 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
|
|||
::com::sun::star::util::DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -578,8 +583,8 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept
|
|||
sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_nRowPos == sal_Int32(m_pFileSet->size());
|
||||
}
|
||||
|
@ -587,8 +592,8 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( ) throw(SQLException, RuntimeExcepti
|
|||
sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_nRowPos == 0;
|
||||
}
|
||||
|
@ -596,8 +601,8 @@ sal_Bool SAL_CALL OResultSet::isFirst( ) throw(SQLException, RuntimeException)
|
|||
sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_nRowPos == sal_Int32(m_pFileSet->size() - 1);
|
||||
}
|
||||
|
@ -605,8 +610,8 @@ sal_Bool SAL_CALL OResultSet::isLast( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(first())
|
||||
previous();
|
||||
|
@ -615,8 +620,8 @@ void SAL_CALL OResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::afterLast( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(last())
|
||||
next();
|
||||
|
@ -628,8 +633,8 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException)
|
|||
{
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
@ -638,8 +643,8 @@ void SAL_CALL OResultSet::close( ) throw(SQLException, RuntimeException)
|
|||
sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return SkipDeleted(OFileTable::FILE_FIRST,1,sal_True);
|
||||
}
|
||||
|
@ -648,8 +653,8 @@ sal_Bool SAL_CALL OResultSet::first( ) throw(SQLException, RuntimeException)
|
|||
sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
// here I know definitely that I stand on the last record
|
||||
return SkipDeleted(OFileTable::FILE_LAST,1,sal_True);
|
||||
|
@ -658,8 +663,8 @@ sal_Bool SAL_CALL OResultSet::last( ) throw(SQLException, RuntimeException)
|
|||
sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return SkipDeleted(OFileTable::FILE_ABSOLUTE,row,sal_True);
|
||||
}
|
||||
|
@ -667,8 +672,8 @@ sal_Bool SAL_CALL OResultSet::absolute( sal_Int32 row ) throw(SQLException, Runt
|
|||
sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return SkipDeleted(OFileTable::FILE_RELATIVE,row,sal_True);
|
||||
}
|
||||
|
@ -676,8 +681,8 @@ sal_Bool SAL_CALL OResultSet::relative( sal_Int32 row ) throw(SQLException, Runt
|
|||
sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return SkipDeleted(OFileTable::FILE_PRIOR,0,sal_True);
|
||||
}
|
||||
|
@ -685,8 +690,8 @@ sal_Bool SAL_CALL OResultSet::previous( ) throw(SQLException, RuntimeException)
|
|||
Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_aStatement.get();
|
||||
}
|
||||
|
@ -695,16 +700,16 @@ Reference< XInterface > SAL_CALL OResultSet::getStatement( ) throw(SQLException
|
|||
sal_Bool SAL_CALL OResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bRowDeleted;
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeException)
|
||||
{ ::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bRowInserted;
|
||||
}
|
||||
|
@ -712,8 +717,8 @@ sal_Bool SAL_CALL OResultSet::rowInserted( ) throw(SQLException, RuntimeExcepti
|
|||
sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bRowUpdated;
|
||||
}
|
||||
|
@ -722,8 +727,8 @@ sal_Bool SAL_CALL OResultSet::rowUpdated( ) throw(SQLException, RuntimeExceptio
|
|||
sal_Bool SAL_CALL OResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_nRowPos == -1;
|
||||
}
|
||||
|
@ -763,8 +768,8 @@ sal_Bool OResultSet::evaluate()
|
|||
sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(!m_pTable)
|
||||
return sal_False;
|
||||
|
@ -776,8 +781,8 @@ sal_Bool SAL_CALL OResultSet::next( ) throw(SQLException, RuntimeException)
|
|||
sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return m_bWasNull;
|
||||
}
|
||||
|
@ -786,8 +791,8 @@ sal_Bool SAL_CALL OResultSet::wasNull( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::cancel( ) throw(RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
void SAL_CALL OResultSet::clearWarnings( ) throw(SQLException, RuntimeException)
|
||||
|
@ -802,11 +807,11 @@ Any SAL_CALL OResultSet::getWarnings( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(!m_bInserted)
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
|
||||
// we know that we append new rows at the end
|
||||
// so we have to know where the end is
|
||||
|
@ -824,8 +829,8 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(m_pTable->isReadOnly())
|
||||
throw SQLException(::rtl::OUString::createFromAscii("Table is readonly!"),*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any());
|
||||
m_bRowUpdated = m_pTable->UpdateRow(m_aInsertRow.getBody(), m_aRow,Reference<XIndexAccess>(m_xColNames,UNO_QUERY));
|
||||
|
@ -848,8 +853,8 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(m_pTable->isReadOnly())
|
||||
throw SQLException(::rtl::OUString::createFromAscii("Table is readonly!"),*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any());
|
||||
|
@ -870,8 +875,8 @@ void SAL_CALL OResultSet::deleteRow() throw(SQLException, RuntimeException)
|
|||
void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bInserted = sal_False;
|
||||
m_bRowUpdated = sal_False;
|
||||
|
@ -893,8 +898,8 @@ void SAL_CALL OResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeExcept
|
|||
void SAL_CALL OResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(m_pTable->isReadOnly())
|
||||
throw SQLException(::rtl::OUString::createFromAscii("Table is readonly!"),*this,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any());
|
||||
|
||||
|
@ -919,8 +924,8 @@ void SAL_CALL OResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeExcept
|
|||
void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
|
@ -934,8 +939,8 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException
|
|||
void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -948,8 +953,8 @@ void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) thr
|
|||
void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -963,8 +968,8 @@ void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(
|
|||
void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -977,8 +982,8 @@ void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) thro
|
|||
void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -999,8 +1004,8 @@ void SAL_CALL OResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw
|
|||
void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1014,8 +1019,8 @@ void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQ
|
|||
void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1028,8 +1033,8 @@ void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(
|
|||
void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1042,8 +1047,8 @@ void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUSt
|
|||
void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1056,8 +1061,8 @@ void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sa
|
|||
void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1071,8 +1076,8 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const ::com::sun::s
|
|||
void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1086,8 +1091,8 @@ void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const ::com::sun::s
|
|||
void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1101,8 +1106,8 @@ void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const ::com::s
|
|||
void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(!x.is())
|
||||
::dbtools::throwFunctionSequenceException(*this);
|
||||
|
||||
|
@ -1118,8 +1123,8 @@ void SAL_CALL OResultSet::updateBinaryStream( sal_Int32 columnIndex, const Refer
|
|||
void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(!x.is())
|
||||
::dbtools::throwFunctionSequenceException(*this);
|
||||
|
||||
|
@ -1135,15 +1140,15 @@ void SAL_CALL OResultSet::updateCharacterStream( sal_Int32 columnIndex, const Re
|
|||
void SAL_CALL OResultSet::refreshRow( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
|
@ -1157,8 +1162,8 @@ void SAL_CALL OResultSet::updateObject( sal_Int32 columnIndex, const Any& x ) th
|
|||
void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
if(columnIndex <= 0 || columnIndex > (sal_Int32)m_xColumns->size())
|
||||
throwInvalidIndexException(*this);
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
|
@ -2552,7 +2557,7 @@ void OResultSet::GetAssignValues()
|
|||
}
|
||||
}
|
||||
if(!aColumnNameList.size())
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
|
||||
// Werte ...
|
||||
OSQLParseNode * pValuesOrQuerySpec = m_pParseTree->getChild(4);
|
||||
|
@ -2562,7 +2567,7 @@ void OResultSet::GetAssignValues()
|
|||
|
||||
// nur "VALUES" ist erlaubt ...
|
||||
if (! SQL_ISTOKEN(pValuesOrQuerySpec->getChild(0),VALUES))
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
|
||||
OSL_ENSURE(pValuesOrQuerySpec->count() == 2,"OResultSet: pValuesOrQuerySpec->count() != 2");
|
||||
|
||||
|
@ -2591,7 +2596,7 @@ void OResultSet::GetAssignValues()
|
|||
// String::CreateFromAscii("S1000"),
|
||||
// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_SYNTAX_ERROR))),
|
||||
// 0, String() );
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2607,7 +2612,7 @@ void OResultSet::GetAssignValues()
|
|||
// String::CreateFromAscii("S1000"),
|
||||
// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_SYNTAX_ERROR))),
|
||||
// 0, String() );
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2615,7 +2620,7 @@ void OResultSet::GetAssignValues()
|
|||
else
|
||||
{
|
||||
// aStatus.SetStatementTooComplex();
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2651,7 +2656,7 @@ void OResultSet::GetAssignValues()
|
|||
if (pComp->getTokenValue().toChar() != '=')
|
||||
{
|
||||
// aStatus.SetInvalidStatement();
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
|
||||
OSQLParseNode * pVal = pAssignment->getChild(2);
|
||||
|
@ -2686,7 +2691,7 @@ void OResultSet::ParseAssignValues(const ::std::vector< String>& aColumnNameList
|
|||
{
|
||||
// Parameter hinzufuegen, Typ ... entsprechend der Column, der der Wert zugewiesen wird
|
||||
Reference<XPropertySet> xCol;
|
||||
::cppu::extractInterface(xCol,m_xColNames->getByName(aColumnName));
|
||||
m_xColNames->getByName(aColumnName) >>= xCol;
|
||||
sal_Int32 nParameter = -1;
|
||||
if(m_xParamColumns.isValid())
|
||||
{
|
||||
|
@ -2702,7 +2707,7 @@ void OResultSet::ParseAssignValues(const ::std::vector< String>& aColumnNameList
|
|||
else
|
||||
{
|
||||
// aStatus.SetStatementTooComplex();
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
@ -2723,7 +2728,7 @@ void OResultSet::SetAssignValue(const String& aColumnName,
|
|||
// String::CreateFromAscii("S0022"),
|
||||
// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_COLUMN_NOT_FOUND))),
|
||||
// 0, String() );
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
|
||||
// Value an die Row mit den zuzuweisenden Werten binden:
|
||||
|
@ -2754,7 +2759,7 @@ void OResultSet::SetAssignValue(const String& aColumnName,
|
|||
else
|
||||
{
|
||||
// aStatus.Set(SQL_STAT_ERROR); // nyi: genauer!
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2781,7 +2786,7 @@ void OResultSet::SetAssignValue(const String& aColumnName,
|
|||
// }
|
||||
} break;
|
||||
default:
|
||||
throw SQLException();
|
||||
throwFunctionSequenceException(*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FStatement.cxx,v $
|
||||
*
|
||||
* $Revision: 1.16 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:37:36 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:53 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -210,8 +210,7 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
|
|||
{
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
}
|
||||
dispose();
|
||||
}
|
||||
|
@ -220,8 +219,8 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException)
|
|||
void OStatement_Base::reset() throw (SQLException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
clearWarnings ();
|
||||
|
||||
|
@ -236,8 +235,8 @@ void OStatement_Base::reset() throw (SQLException)
|
|||
void OStatement_Base::clearMyResultSet () throw (SQLException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference<XCloseable> xCloseable;
|
||||
if(::comphelper::query_interface(m_xResultSet.get(),xCloseable))
|
||||
|
@ -252,8 +251,8 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
|
|||
void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_aLastWarning = ex;
|
||||
}
|
||||
|
@ -263,8 +262,8 @@ void OStatement_Base::setWarning (const SQLWarning &ex) throw( SQLException)
|
|||
sal_Bool SAL_CALL OStatement_Base::execute( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > xRS = executeQuery(sql);
|
||||
|
||||
|
@ -276,8 +275,8 @@ sal_Bool SAL_CALL OStatement_Base::execute( const ::rtl::OUString& sql ) throw(S
|
|||
Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > xRS = NULL;
|
||||
|
||||
|
@ -335,8 +334,8 @@ Reference< XConnection > SAL_CALL OStatement_Base::getConnection( ) throw(SQLEx
|
|||
sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XResultSet > xRS = NULL;
|
||||
|
||||
|
@ -364,8 +363,8 @@ sal_Int32 SAL_CALL OStatement_Base::executeUpdate( const ::rtl::OUString& sql )
|
|||
Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return makeAny(m_aLastWarning);
|
||||
}
|
||||
|
@ -375,8 +374,8 @@ Any SAL_CALL OStatement_Base::getWarnings( ) throw(SQLException, RuntimeExcepti
|
|||
void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OStatement_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_aLastWarning = SQLWarning();
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: fcode.cxx,v $
|
||||
*
|
||||
* $Revision: 1.15 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:51:37 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:53 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -117,7 +117,7 @@ TYPEINIT1(OOp_COMPARE, OBoolOperator);
|
|||
TYPEINIT1(ONumOperator, OOperator);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
#if 0
|
||||
#if SUPD < 632
|
||||
sal_Int32 compareIgnoreCase(const rtl::OUString& rStr1, const rtl::OUString& rStr2, const ::rtl::OLocale& rLocale)
|
||||
{
|
||||
rtl::OUString aString1 = rStr1.toUpperCase(rLocale);
|
||||
|
@ -377,22 +377,22 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con
|
|||
case DataType::CHAR:
|
||||
case DataType::VARCHAR:
|
||||
{
|
||||
#if 0
|
||||
#if SUPD < 632
|
||||
static String sLanguage;
|
||||
static String sCountry;
|
||||
if (!sLanguage.Len())
|
||||
ConvertLanguageToIsoNames(Application::GetAppInternational().GetLanguage(), sLanguage, sCountry);
|
||||
|
||||
static rtl::OLocale aLocale = rtl::OLocale::registerLocale(sLanguage, sCountry);
|
||||
|
||||
INT32 nRes = compareIgnoreCase(aLH, aRH, aLocale);
|
||||
#endif
|
||||
#else
|
||||
INT32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength
|
||||
(
|
||||
static_cast<rtl::OUString>(aLH).pData->buffer,
|
||||
static_cast<rtl::OUString>(aLH).pData->length,
|
||||
static_cast<rtl::OUString>(aRH).pData->buffer,
|
||||
static_cast<rtl::OUString>(aRH).pData->length );
|
||||
#endif
|
||||
switch(aPredicateType)
|
||||
{
|
||||
case SQL_PRED_EQUAL: bResult = (nRes == 0); break;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: EConnection.cxx,v $
|
||||
*
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-27 10:08:10 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:52 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -167,8 +167,8 @@ void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< Prope
|
|||
Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_B::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_B::rBHelper.bDisposed);
|
||||
|
||||
|
||||
Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
|
||||
if(!xMetaData.is())
|
||||
|
@ -196,8 +196,8 @@ Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(S
|
|||
Reference< XStatement > SAL_CALL OFlatConnection::createStatement( ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_B::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_B::rBHelper.bDisposed);
|
||||
|
||||
OFlatStatement* pStmt = new OFlatStatement(this);
|
||||
|
||||
Reference< XStatement > xStmt = pStmt;
|
||||
|
@ -208,10 +208,10 @@ Reference< XStatement > SAL_CALL OFlatConnection::createStatement( ) throw(SQLE
|
|||
Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_B::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_B::rBHelper.bDisposed);
|
||||
|
||||
OFlatPreparedStatement* pStmt = new OFlatPreparedStatement(this,m_aTypeInfo);
|
||||
|
||||
OFlatPreparedStatement* pStmt = new OFlatPreparedStatement(this);
|
||||
Reference< XPreparedStatement > xStmt = pStmt;
|
||||
pStmt->construct(sql);
|
||||
|
||||
|
@ -222,8 +222,8 @@ Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareStatement( cons
|
|||
Reference< XPreparedStatement > SAL_CALL OFlatConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OConnection_B::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OConnection_B::rBHelper.bDisposed);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: EResultSet.cxx,v $
|
||||
*
|
||||
* $Revision: 1.7 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-14 11:37:36 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:52 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -154,8 +154,8 @@ Sequence< Type > SAL_CALL OFlatResultSet::getTypes( ) throw( RuntimeException)
|
|||
Any SAL_CALL OFlatResultSet::getBookmark( ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return makeAny((sal_Int32)(*m_aRow)[0]);
|
||||
}
|
||||
|
@ -163,8 +163,8 @@ Any SAL_CALL OFlatResultSet::getBookmark( ) throw( SQLException, RuntimeExcept
|
|||
sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -174,8 +174,8 @@ sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark ) throw(
|
|||
sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
|
||||
|
||||
|
@ -186,8 +186,8 @@ sal_Bool SAL_CALL OFlatResultSet::moveRelativeToBookmark( const Any& bookmark,
|
|||
sal_Int32 SAL_CALL OFlatResultSet::compareBookmarks( const Any& first, const Any& second ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return (first == second) ? 0 : 2;
|
||||
}
|
||||
|
@ -200,8 +200,8 @@ sal_Bool SAL_CALL OFlatResultSet::hasOrderedBookmarks( ) throw( SQLException,
|
|||
sal_Int32 SAL_CALL OFlatResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
|
||||
{
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
if (OResultSet_BASE::rBHelper.bDisposed)
|
||||
throw DisposedException();
|
||||
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
|
||||
|
||||
|
||||
return connectivity::getINT32(bookmark);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.11 $
|
||||
# $Revision: 1.12 $
|
||||
#
|
||||
# last change: $Author: oj $ $Date: 2001-05-14 13:36:27 $
|
||||
# last change: $Author: oj $ $Date: 2001-05-17 06:46:52 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
|
@ -123,7 +123,6 @@ SHL1STDLIBS+= ifile$(UPD).lib
|
|||
|
||||
SHL1DEPN=
|
||||
SHL1IMPLIB= i$(TARGET)
|
||||
SHL1LIBS= $(SLB)$/file.lib
|
||||
|
||||
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: OResultSet.cxx,v $
|
||||
*
|
||||
* $Revision: 1.21 $
|
||||
* $Revision: 1.22 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-15 08:18:13 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:51 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -232,50 +232,50 @@ void OResultSet::allocBuffer(sal_Bool _bAllocRow)
|
|||
{
|
||||
case DataType::CHAR:
|
||||
case DataType::VARCHAR:
|
||||
m_aBindVector.push_back(new ::rtl::OString());
|
||||
m_aBindVector.push_back((sal_Int64)new ::rtl::OString());
|
||||
break;
|
||||
case DataType::DECIMAL:
|
||||
case DataType::NUMERIC:
|
||||
case DataType::BIGINT:
|
||||
m_aBindVector.push_back(new ::rtl::OString());
|
||||
m_aBindVector.push_back((sal_Int64)new ::rtl::OString());
|
||||
break;
|
||||
case DataType::FLOAT:
|
||||
m_aBindVector.push_back(new float(0.0));
|
||||
m_aBindVector.push_back((sal_Int64)new float(0.0));
|
||||
break;
|
||||
case DataType::DOUBLE:
|
||||
m_aBindVector.push_back(new double(0.0));
|
||||
m_aBindVector.push_back((sal_Int64)new double(0.0));
|
||||
break;
|
||||
case DataType::LONGVARCHAR:
|
||||
m_aBindVector.push_back(new char[2]); // dient nur zum auffinden
|
||||
m_aBindVector.push_back((sal_Int64)new char[2]); // dient nur zum auffinden
|
||||
break;
|
||||
case DataType::LONGVARBINARY:
|
||||
m_aBindVector.push_back(new char[2]); // dient nur zum auffinden
|
||||
m_aBindVector.push_back((sal_Int64)new char[2]); // dient nur zum auffinden
|
||||
break;
|
||||
case DataType::DATE:
|
||||
m_aBindVector.push_back(new DATE_STRUCT);
|
||||
m_aBindVector.push_back((sal_Int64)new DATE_STRUCT);
|
||||
break;
|
||||
case DataType::TIME:
|
||||
m_aBindVector.push_back(new TIME_STRUCT);
|
||||
m_aBindVector.push_back((sal_Int64)new TIME_STRUCT);
|
||||
break;
|
||||
case DataType::TIMESTAMP:
|
||||
m_aBindVector.push_back(new TIMESTAMP_STRUCT);
|
||||
m_aBindVector.push_back((sal_Int64)new TIMESTAMP_STRUCT);
|
||||
break;
|
||||
case DataType::BIT:
|
||||
m_aBindVector.push_back(new sal_Int8(0));
|
||||
m_aBindVector.push_back((sal_Int64)new sal_Int8(0));
|
||||
break;
|
||||
case DataType::TINYINT:
|
||||
case DataType::SMALLINT:
|
||||
m_aBindVector.push_back(new sal_Int16(0));
|
||||
m_aBindVector.push_back((sal_Int64)new sal_Int16(0));
|
||||
break;
|
||||
case DataType::INTEGER:
|
||||
m_aBindVector.push_back(new sal_Int32(0));
|
||||
m_aBindVector.push_back((sal_Int64)new sal_Int32(0));
|
||||
break;
|
||||
case DataType::REAL:
|
||||
m_aBindVector.push_back(new float(0));
|
||||
m_aBindVector.push_back((sal_Int64)new float(0));
|
||||
break;
|
||||
case DataType::BINARY:
|
||||
case DataType::VARBINARY:
|
||||
m_aBindVector.push_back(new sal_Int8[xMeta->getPrecision(i)]);
|
||||
m_aBindVector.push_back((sal_Int64)new sal_Int8[xMeta->getPrecision(i)]);
|
||||
break;
|
||||
default:
|
||||
OSL_ENSURE(0,"Unknown type");
|
||||
|
@ -291,7 +291,7 @@ void OResultSet::releaseBuffer()
|
|||
{
|
||||
Reference< XResultSetMetaData > xMeta = getMetaData();
|
||||
sal_Int32 nLen = xMeta->getColumnCount();
|
||||
void** pValue = m_aBindVector.begin() + 1;
|
||||
TVoidVector::iterator pValue = m_aBindVector.begin() + 1;
|
||||
for(sal_Int32 i = 1; i<=nLen; ++i, ++pValue)
|
||||
{
|
||||
OSL_ENSURE(pValue != m_aBindVector.end(),"Iterator is equal end!");
|
||||
|
@ -299,50 +299,50 @@ void OResultSet::releaseBuffer()
|
|||
{
|
||||
case DataType::CHAR:
|
||||
case DataType::VARCHAR:
|
||||
delete static_cast< ::rtl::OString* >(*pValue);
|
||||
delete static_cast< ::rtl::OString* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::DECIMAL:
|
||||
case DataType::NUMERIC:
|
||||
case DataType::BIGINT:
|
||||
delete static_cast< ::rtl::OString* >(*pValue);
|
||||
delete static_cast< ::rtl::OString* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::FLOAT:
|
||||
delete static_cast< float* >(*pValue);
|
||||
delete static_cast< float* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::DOUBLE:
|
||||
delete static_cast< double* >(*pValue);
|
||||
delete static_cast< double* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::LONGVARCHAR:
|
||||
delete static_cast< char* >(*pValue);
|
||||
delete static_cast< char* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::LONGVARBINARY:
|
||||
delete static_cast< char* >(*pValue);
|
||||
delete static_cast< char* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::DATE:
|
||||
delete static_cast< DATE_STRUCT* >(*pValue);
|
||||
delete static_cast< DATE_STRUCT* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::TIME:
|
||||
delete static_cast< TIME_STRUCT* >(*pValue);
|
||||
delete static_cast< TIME_STRUCT* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::TIMESTAMP:
|
||||
delete static_cast< TIMESTAMP_STRUCT* >(*pValue);
|
||||
delete static_cast< TIMESTAMP_STRUCT* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::BIT:
|
||||
delete static_cast< sal_Int8* >(*pValue);
|
||||
delete static_cast< sal_Int8* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::TINYINT:
|
||||
case DataType::SMALLINT:
|
||||
delete static_cast< sal_Int16* >(*pValue);
|
||||
delete static_cast< sal_Int16* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::INTEGER:
|
||||
delete static_cast< sal_Int32* >(*pValue);
|
||||
delete static_cast< sal_Int32* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::REAL:
|
||||
delete static_cast< float* >(*pValue);
|
||||
delete static_cast< float* >((void*)*pValue);
|
||||
break;
|
||||
case DataType::BINARY:
|
||||
case DataType::VARBINARY:
|
||||
delete static_cast< sal_Int8* >(*pValue);
|
||||
delete static_cast< sal_Int8* >((void*)*pValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1028,7 +1028,7 @@ void SAL_CALL OResultSet::updateRow( ) throw(SQLException, RuntimeException)
|
|||
if (nRet != SQL_SUCCESS && nRet != SQL_SUCCESS_WITH_INFO && nRet != SQL_NEED_DATA)
|
||||
break;
|
||||
|
||||
::std::vector<void*>::const_iterator aFound = ::std::find(m_aBindVector.begin(),m_aBindVector.end(),pData);
|
||||
TVoidVector::const_iterator aFound = ::std::find(m_aBindVector.begin(),m_aBindVector.end(),(sal_Int64)pData);
|
||||
sal_Int32 nPos = m_aBindVector.size() - (m_aBindVector.end() - aFound);
|
||||
|
||||
// TODO transfer long data
|
||||
|
@ -1093,7 +1093,7 @@ void SAL_CALL OResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) thr
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_BIT,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1105,7 +1105,7 @@ void SAL_CALL OResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(
|
|||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_CHAR,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1117,7 +1117,7 @@ void SAL_CALL OResultSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) thro
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_TINYINT,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1129,7 +1129,7 @@ void SAL_CALL OResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(
|
|||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_INTEGER,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1150,7 +1150,7 @@ void SAL_CALL OResultSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQ
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_REAL,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1162,7 +1162,7 @@ void SAL_CALL OResultSet::updateDouble( sal_Int32 columnIndex, double x ) throw(
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_DOUBLE,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1173,7 +1173,7 @@ void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const ::rtl::OUSt
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_VARCHAR,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1184,7 +1184,7 @@ void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sa
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_BINARY,0,0,&x,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1195,7 +1195,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
DATE_STRUCT aVal = OTools::DateToOdbcDate(x);
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_DATE,0,0,&aVal,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
|
@ -1208,7 +1208,7 @@ void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) thr
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
TIME_STRUCT aVal = OTools::TimeToOdbcTime(x);
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_TIME,0,0,&aVal,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
|
@ -1221,7 +1221,7 @@ void SAL_CALL OResultSet::updateTimestamp( sal_Int32 columnIndex, const DateTime
|
|||
|
||||
|
||||
columnIndex = mapColumn(columnIndex);
|
||||
void* pData = m_aBindVector[columnIndex];
|
||||
void* pData = (void*)m_aBindVector[columnIndex];
|
||||
TIMESTAMP_STRUCT aVal = OTools::DateTimeToTimestamp(x);
|
||||
OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_TIMESTAMP,0,0,&aVal,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ADatabaseMetaDataResultSet.hxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-02 12:54:53 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:50 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -129,7 +129,6 @@ namespace connectivity
|
|||
public ::cppu::OPropertySetHelper,
|
||||
public ::comphelper::OPropertyArrayUsageHelper<ODatabaseMetaDataResultSet>
|
||||
{
|
||||
::std::vector<void*> m_aBindVector;
|
||||
::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
|
||||
|
||||
::std::map<sal_Int32, TInt2IntMap > m_aValueRange;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ADatabaseMetaDataResultSetMetaData.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-30 10:09:04 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:50 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -102,7 +102,6 @@ namespace connectivity
|
|||
ADORecordset* m_pRecordSet;
|
||||
sal_Int32 m_nColCount;
|
||||
|
||||
sal_Int32 MapADOType2Jdbc(DataTypeEnum eType);
|
||||
protected:
|
||||
void setColumnPrivilegesMap();
|
||||
void setColumnsMap();
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: Awrapadox.hxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-27 11:38:26 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:50 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -132,96 +132,21 @@ namespace connectivity
|
|||
inline WpADOColumn& operator=(const WpADOColumn& rhs)
|
||||
{WpOLEBase<_ADOColumn>::operator=(rhs); return *this;}
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
::rtl::OUString get_RelatedColumn() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_RelatedColumn(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
}
|
||||
void put_RelatedColumn(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_RelatedColumn(bstr));
|
||||
}
|
||||
|
||||
DataTypeEnum get_Type() const
|
||||
{
|
||||
DataTypeEnum eNum = adVarChar;
|
||||
pInterface->get_Type(&eNum);
|
||||
return eNum;
|
||||
}
|
||||
|
||||
void put_Type(const DataTypeEnum& _eNum)
|
||||
{
|
||||
pInterface->put_Type(_eNum);
|
||||
}
|
||||
|
||||
sal_Int32 get_Precision() const
|
||||
{
|
||||
sal_Int32 nPrec=0;
|
||||
pInterface->get_Precision(&nPrec);
|
||||
return nPrec;
|
||||
}
|
||||
|
||||
void put_Precision(sal_Int32 _nPre)
|
||||
{
|
||||
pInterface->put_Precision(_nPre);
|
||||
}
|
||||
|
||||
sal_Int32 get_NumericScale() const
|
||||
{
|
||||
sal_uInt8 nPrec=0;
|
||||
pInterface->get_NumericScale(&nPrec);
|
||||
return nPrec;
|
||||
}
|
||||
|
||||
void put_NumericScale(sal_Int8 _nScale)
|
||||
{
|
||||
pInterface->put_NumericScale(_nScale);
|
||||
}
|
||||
|
||||
SortOrderEnum get_SortOrder() const
|
||||
{
|
||||
SortOrderEnum nPrec=adSortAscending;
|
||||
pInterface->get_SortOrder(&nPrec);
|
||||
return nPrec;
|
||||
}
|
||||
|
||||
void put_SortOrder(SortOrderEnum _nScale)
|
||||
{
|
||||
pInterface->put_SortOrder(_nScale);
|
||||
}
|
||||
|
||||
ColumnAttributesEnum get_Attributes() const
|
||||
{
|
||||
ColumnAttributesEnum eNum=adColNullable;
|
||||
pInterface->get_Attributes(&eNum);
|
||||
return eNum;
|
||||
}
|
||||
|
||||
void put_Attributes(const ColumnAttributesEnum& _eNum)
|
||||
{
|
||||
pInterface->put_Attributes(_eNum);
|
||||
}
|
||||
|
||||
ADOProperties* get_Properties() const
|
||||
{
|
||||
ADOProperties* pProps = NULL;
|
||||
pInterface->get_Properties(&pProps);
|
||||
return pProps;
|
||||
}
|
||||
::rtl::OUString get_Name() const;
|
||||
::rtl::OUString get_RelatedColumn() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
void put_RelatedColumn(const ::rtl::OUString& _rName);
|
||||
DataTypeEnum get_Type() const;
|
||||
void put_Type(const DataTypeEnum& _eNum) ;
|
||||
sal_Int32 get_Precision() const;
|
||||
void put_Precision(sal_Int32 _nPre) ;
|
||||
sal_Int32 get_NumericScale() const;
|
||||
void put_NumericScale(sal_Int8 _nScale);
|
||||
SortOrderEnum get_SortOrder() const;
|
||||
void put_SortOrder(SortOrderEnum _nScale);
|
||||
ColumnAttributesEnum get_Attributes() const;
|
||||
void put_Attributes(const ColumnAttributesEnum& _eNum);
|
||||
ADOProperties* get_Properties() const;
|
||||
};
|
||||
|
||||
class WpADOKey : public WpOLEBase<ADOKey>
|
||||
|
@ -235,76 +160,17 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
|
||||
}
|
||||
|
||||
KeyTypeEnum get_Type() const
|
||||
{
|
||||
KeyTypeEnum eNum=adKeyPrimary;
|
||||
pInterface->get_Type(&eNum);
|
||||
return eNum;
|
||||
}
|
||||
|
||||
void put_Type(const KeyTypeEnum& _eNum)
|
||||
{
|
||||
pInterface->put_Type(_eNum);
|
||||
}
|
||||
|
||||
::rtl::OUString get_RelatedTable() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_RelatedTable(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_RelatedTable(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_RelatedTable(bstr));
|
||||
|
||||
}
|
||||
|
||||
RuleEnum get_DeleteRule() const
|
||||
{
|
||||
RuleEnum eNum = adRINone;
|
||||
pInterface->get_DeleteRule(&eNum);
|
||||
return eNum;
|
||||
}
|
||||
|
||||
void put_DeleteRule(const RuleEnum& _eNum)
|
||||
{
|
||||
pInterface->put_DeleteRule(_eNum);
|
||||
}
|
||||
|
||||
RuleEnum get_UpdateRule() const
|
||||
{
|
||||
RuleEnum eNum = adRINone;
|
||||
pInterface->get_UpdateRule(&eNum);
|
||||
return eNum;
|
||||
}
|
||||
|
||||
void put_UpdateRule(const RuleEnum& _eNum)
|
||||
{
|
||||
pInterface->put_UpdateRule(_eNum);
|
||||
}
|
||||
|
||||
ADOColumns* get_Columns() const
|
||||
{
|
||||
ADOColumns* pCols = NULL;
|
||||
pInterface->get_Columns(&pCols);
|
||||
return pCols;
|
||||
}
|
||||
::rtl::OUString get_Name() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
KeyTypeEnum get_Type() const;
|
||||
void put_Type(const KeyTypeEnum& _eNum) ;
|
||||
::rtl::OUString get_RelatedTable() const;
|
||||
void put_RelatedTable(const ::rtl::OUString& _rName);
|
||||
RuleEnum get_DeleteRule() const;
|
||||
void put_DeleteRule(const RuleEnum& _eNum) ;
|
||||
RuleEnum get_UpdateRule() const;
|
||||
void put_UpdateRule(const RuleEnum& _eNum) ;
|
||||
ADOColumns* get_Columns() const;
|
||||
};
|
||||
|
||||
class WpADOIndex : public WpOLEBase<_ADOIndex>
|
||||
|
@ -318,62 +184,15 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
|
||||
}
|
||||
|
||||
sal_Bool get_Clustered() const
|
||||
{
|
||||
VARIANT_BOOL eNum = VARIANT_FALSE;
|
||||
pInterface->get_Clustered(&eNum);
|
||||
return eNum == VARIANT_TRUE;
|
||||
}
|
||||
|
||||
void put_Clustered(sal_Bool _b)
|
||||
{
|
||||
pInterface->put_Clustered(_b ? VARIANT_TRUE : VARIANT_FALSE);
|
||||
}
|
||||
|
||||
sal_Bool get_Unique() const
|
||||
{
|
||||
VARIANT_BOOL eNum = VARIANT_FALSE;
|
||||
pInterface->get_Unique(&eNum);
|
||||
return eNum == VARIANT_TRUE;
|
||||
}
|
||||
|
||||
void put_Unique(sal_Bool _b)
|
||||
{
|
||||
pInterface->put_Unique(_b ? VARIANT_TRUE : VARIANT_FALSE);
|
||||
}
|
||||
|
||||
sal_Bool get_PrimaryKey() const
|
||||
{
|
||||
VARIANT_BOOL eNum = VARIANT_FALSE;
|
||||
pInterface->get_PrimaryKey(&eNum);
|
||||
return eNum == VARIANT_TRUE;
|
||||
}
|
||||
|
||||
void put_PrimaryKey(sal_Bool _b)
|
||||
{
|
||||
pInterface->put_PrimaryKey(_b ? VARIANT_TRUE : VARIANT_FALSE);
|
||||
}
|
||||
|
||||
ADOColumns* get_Columns() const
|
||||
{
|
||||
ADOColumns* pCols = NULL;
|
||||
pInterface->get_Columns(&pCols);
|
||||
return pCols;
|
||||
}
|
||||
::rtl::OUString get_Name() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
sal_Bool get_Clustered() const;
|
||||
void put_Clustered(sal_Bool _b);
|
||||
sal_Bool get_Unique() const;
|
||||
void put_Unique(sal_Bool _b);
|
||||
sal_Bool get_PrimaryKey() const;
|
||||
void put_PrimaryKey(sal_Bool _b);
|
||||
ADOColumns* get_Columns() const;
|
||||
};
|
||||
|
||||
class WpADOCatalog : public WpOLEBase<_ADOCatalog>
|
||||
|
@ -387,46 +206,12 @@ namespace connectivity
|
|||
|
||||
::rtl::OUString GetObjectOwner(const ::rtl::OUString& _rName, ObjectTypeEnum _eNum);
|
||||
|
||||
void putref_ActiveConnection(IDispatch* pCon)
|
||||
{
|
||||
pInterface->putref_ActiveConnection(pCon);
|
||||
}
|
||||
|
||||
ADOTables* get_Tables()
|
||||
{
|
||||
ADOTables* pRet = NULL;
|
||||
pInterface->get_Tables(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
ADOViews* get_Views()
|
||||
{
|
||||
ADOViews* pRet = NULL;
|
||||
pInterface->get_Views(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
ADOGroups* get_Groups()
|
||||
{
|
||||
ADOGroups* pRet = NULL;
|
||||
pInterface->get_Groups(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
ADOUsers* get_Users()
|
||||
{
|
||||
ADOUsers* pRet = NULL;
|
||||
pInterface->get_Users(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
ADOProcedures* get_Procedures()
|
||||
{
|
||||
ADOProcedures* pRet = NULL;
|
||||
pInterface->get_Procedures(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
void putref_ActiveConnection(IDispatch* pCon);
|
||||
ADOTables* get_Tables();
|
||||
ADOViews* get_Views();
|
||||
ADOGroups* get_Groups();
|
||||
ADOUsers* get_Users();
|
||||
ADOProcedures* get_Procedures();
|
||||
void Create();
|
||||
};
|
||||
|
||||
|
@ -441,61 +226,14 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
|
||||
}
|
||||
|
||||
::rtl::OUString get_Type() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Type(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
ADOColumns* get_Columns() const
|
||||
{
|
||||
ADOColumns* pCols = NULL;
|
||||
pInterface->get_Columns(&pCols);
|
||||
return pCols;
|
||||
}
|
||||
|
||||
ADOIndexes* get_Indexes() const
|
||||
{
|
||||
ADOIndexes* pCols = NULL;
|
||||
pInterface->get_Indexes(&pCols);
|
||||
return pCols;
|
||||
}
|
||||
|
||||
ADOKeys* get_Keys() const
|
||||
{
|
||||
ADOKeys* pCols = NULL;
|
||||
pInterface->get_Keys(&pCols);
|
||||
return pCols;
|
||||
}
|
||||
|
||||
WpADOCatalog get_ParentCatalog() const
|
||||
{
|
||||
ADOCatalog* pCat = NULL;
|
||||
pInterface->get_ParentCatalog(&pCat);
|
||||
return WpADOCatalog(pCat);
|
||||
}
|
||||
|
||||
ADOProperties* get_Properties() const
|
||||
{
|
||||
ADOProperties* pProps = NULL;
|
||||
pInterface->get_Properties(&pProps);
|
||||
return pProps;
|
||||
}
|
||||
::rtl::OUString get_Name() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
::rtl::OUString get_Type() const;
|
||||
ADOColumns* get_Columns() const;
|
||||
ADOIndexes* get_Indexes() const;
|
||||
ADOKeys* get_Keys() const;
|
||||
WpADOCatalog get_ParentCatalog() const;
|
||||
ADOProperties* get_Properties() const;
|
||||
};
|
||||
|
||||
class WpADOView : public WpOLEBase<ADOView>
|
||||
|
@ -509,22 +247,9 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void get_Command(OLEVariant& _rVar) const
|
||||
{
|
||||
pInterface->get_Command(&_rVar);
|
||||
}
|
||||
|
||||
void put_Command(OLEVariant& _rVar)
|
||||
{
|
||||
pInterface->put_Command(_rVar);
|
||||
}
|
||||
::rtl::OUString get_Name() const;
|
||||
void get_Command(OLEVariant& _rVar) const;
|
||||
void put_Command(OLEVariant& _rVar);
|
||||
};
|
||||
|
||||
class WpADOGroup : public WpOLEBase<_ADOGroup>
|
||||
|
@ -538,48 +263,17 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
|
||||
}
|
||||
|
||||
::rtl::OUString get_Name() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
RightsEnum GetPermissions(
|
||||
/* [in] */ const OLEVariant& Name,
|
||||
/* [in] */ ObjectTypeEnum ObjectType)
|
||||
{
|
||||
RightsEnum Rights=adRightNone;
|
||||
OLEVariant ObjectTypeId;
|
||||
ObjectTypeId.setNoArg();
|
||||
pInterface->GetPermissions(Name,ObjectType,ObjectTypeId,&Rights);
|
||||
return Rights;
|
||||
}
|
||||
|
||||
/* [in] */ ObjectTypeEnum ObjectType);
|
||||
sal_Bool SetPermissions(
|
||||
/* [in] */ const OLEVariant& Name,
|
||||
/* [in] */ ObjectTypeEnum ObjectType,
|
||||
/* [in] */ ActionEnum Action,
|
||||
/* [in] */ RightsEnum Rights)
|
||||
{
|
||||
OLEVariant ObjectTypeId;
|
||||
ObjectTypeId.setNoArg();
|
||||
return SUCCEEDED(pInterface->SetPermissions(Name,ObjectType,Action,Rights,adInheritNone,ObjectTypeId));
|
||||
}
|
||||
|
||||
ADOUsers* get_Users( )
|
||||
{
|
||||
ADOUsers* pRet = NULL;
|
||||
pInterface->get_Users( &pRet);
|
||||
return pRet;
|
||||
}
|
||||
/* [in] */ RightsEnum Rights);
|
||||
ADOUsers* get_Users( );
|
||||
};
|
||||
|
||||
class WpADOUser : public WpOLEBase<_ADOUser>
|
||||
|
@ -593,56 +287,18 @@ namespace connectivity
|
|||
|
||||
void Create();
|
||||
|
||||
::rtl::OUString get_Name() const
|
||||
{
|
||||
OLEString aBSTR;
|
||||
pInterface->get_Name(&aBSTR);
|
||||
return aBSTR;
|
||||
}
|
||||
|
||||
void put_Name(const ::rtl::OUString& _rName)
|
||||
{
|
||||
OLEString bstr(_rName);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
|
||||
|
||||
}
|
||||
|
||||
sal_Bool ChangePassword(const ::rtl::OUString& _rPwd,const ::rtl::OUString& _rNewPwd)
|
||||
{
|
||||
OLEString sStr1(_rPwd);
|
||||
OLEString sStr2(_rNewPwd);
|
||||
sal_Bool bErg = SUCCEEDED(pInterface->ChangePassword(sStr1,sStr2));
|
||||
return bErg;
|
||||
}
|
||||
|
||||
ADOGroups* get_Groups()
|
||||
{
|
||||
ADOGroups* pRet = NULL;
|
||||
pInterface->get_Groups(&pRet);
|
||||
return pRet;
|
||||
}
|
||||
|
||||
::rtl::OUString get_Name() const;
|
||||
void put_Name(const ::rtl::OUString& _rName);
|
||||
sal_Bool ChangePassword(const ::rtl::OUString& _rPwd,const ::rtl::OUString& _rNewPwd);
|
||||
ADOGroups* get_Groups();
|
||||
RightsEnum GetPermissions(
|
||||
/* [in] */ const OLEVariant& Name,
|
||||
/* [in] */ ObjectTypeEnum ObjectType)
|
||||
{
|
||||
RightsEnum Rights=adRightNone;
|
||||
OLEVariant ObjectTypeId;
|
||||
ObjectTypeId.setNoArg();
|
||||
pInterface->GetPermissions(Name,ObjectType,ObjectTypeId,&Rights);
|
||||
return Rights;
|
||||
}
|
||||
|
||||
/* [in] */ ObjectTypeEnum ObjectType);
|
||||
sal_Bool SetPermissions(
|
||||
/* [in] */ const OLEVariant& Name,
|
||||
/* [in] */ ObjectTypeEnum ObjectType,
|
||||
/* [in] */ ActionEnum Action,
|
||||
/* [in] */ RightsEnum Rights)
|
||||
{
|
||||
OLEVariant ObjectTypeId;
|
||||
ObjectTypeId.setNoArg();
|
||||
return SUCCEEDED(pInterface->SetPermissions(Name,ObjectType,Action,Rights,adInheritNone,ObjectTypeId));
|
||||
}
|
||||
/* [in] */ RightsEnum Rights);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: CPreparedStatement.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-30 10:09:03 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:49 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -76,7 +76,7 @@ namespace connectivity
|
|||
protected:
|
||||
virtual file::OResultSet* createResultSet();
|
||||
public:
|
||||
OCalcPreparedStatement( file::OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo) : file::OPreparedStatement( _pConnection,_TypeInfo){}
|
||||
OCalcPreparedStatement( file::OConnection* _pConnection) : file::OPreparedStatement( _pConnection){}
|
||||
DECLARE_SERVICE_INFO();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: DPreparedStatement.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-30 10:09:03 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:49 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -76,7 +76,7 @@ namespace connectivity
|
|||
protected:
|
||||
virtual file::OResultSet* createResultSet();
|
||||
public:
|
||||
ODbasePreparedStatement( file::OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo) : file::OPreparedStatement( _pConnection,_TypeInfo){}
|
||||
ODbasePreparedStatement( file::OConnection* _pConnection) : file::OPreparedStatement( _pConnection){}
|
||||
DECLARE_SERVICE_INFO();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FConnection.hxx,v $
|
||||
*
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-27 10:08:13 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -120,9 +120,6 @@ namespace connectivity
|
|||
//====================================================================
|
||||
// Data attributes
|
||||
//====================================================================
|
||||
::std::vector<connectivity::OTypeInfo> m_aTypeInfo; // vector containing an entry
|
||||
// for each row returned by
|
||||
// DatabaseMetaData.getTypeInfo.
|
||||
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
|
||||
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier> m_xCatalog;
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FPreparedStatement.hxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-30 09:59:56 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -117,7 +117,7 @@ namespace connectivity
|
|||
public:
|
||||
DECLARE_SERVICE_INFO();
|
||||
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
|
||||
OPreparedStatement( OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo);
|
||||
OPreparedStatement( OConnection* _pConnection);
|
||||
|
||||
void construct(const ::rtl::OUString& sql) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: FResultSet.hxx,v $
|
||||
*
|
||||
* $Revision: 1.16 $
|
||||
* $Revision: 1.17 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-10 14:31:14 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -301,7 +301,6 @@ OFILEKeyCompare(const void * elem1, const void * elem2);
|
|||
sal_Int32 m_nRowCountResult;
|
||||
sal_Int32 m_nCurrentPosition; // current position of the resultset is returned when ask for getRow()
|
||||
sal_Bool m_bWasNull;
|
||||
sal_Bool m_bBOF; // before first record
|
||||
sal_Bool m_bEOF; // after last record
|
||||
sal_Bool m_bLastRecord;
|
||||
sal_Bool m_bFileSetFrozen;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: EPreparedStatement.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-04-30 09:59:56 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:48 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -76,7 +76,7 @@ namespace connectivity
|
|||
protected:
|
||||
virtual file::OResultSet* createResultSet();
|
||||
public:
|
||||
OFlatPreparedStatement( file::OConnection* _pConnection,const ::std::vector<connectivity::OTypeInfo>& _TypeInfo) : file::OPreparedStatement( _pConnection,_TypeInfo){}
|
||||
OFlatPreparedStatement( file::OConnection* _pConnection) : file::OPreparedStatement( _pConnection){}
|
||||
DECLARE_SERVICE_INFO();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ODatabaseMetaDataResultSet.hxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-15 08:18:15 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:47 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -129,7 +129,6 @@ namespace connectivity
|
|||
public ::cppu::OPropertySetHelper,
|
||||
public ::comphelper::OPropertyArrayUsageHelper<ODatabaseMetaDataResultSet>
|
||||
{
|
||||
::std::vector<void*> m_aBindVector;
|
||||
::connectivity::TIntVector m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
|
||||
|
||||
::std::map<sal_Int32, ::connectivity::TInt2IntMap > m_aValueRange;
|
||||
|
@ -153,11 +152,9 @@ namespace connectivity
|
|||
sal_Int32 m_nLastColumnPos; // used for m_aRow just to know where we are
|
||||
SQLRETURN m_nCurrentFetchState;
|
||||
sal_Bool m_bWasNull;
|
||||
sal_Bool m_bBOF; // before first record
|
||||
sal_Bool m_bEOF; // after last record
|
||||
sal_Bool m_bLastRecord;
|
||||
sal_Bool m_bFreeHandle;
|
||||
sal_Bool m_bInserting;
|
||||
sal_Bool m_bFetchData; // true when SQLGetaData can be called in any order or when fetching data for m_aRow
|
||||
|
||||
sal_Int32 getResultSetConcurrency() const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
|
||||
|
@ -194,10 +191,11 @@ namespace connectivity
|
|||
::com::sun::star::uno::Any& rValue,
|
||||
sal_Int32 nHandle
|
||||
) const;
|
||||
~ODatabaseMetaDataResultSet();
|
||||
public:
|
||||
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
|
||||
ODatabaseMetaDataResultSet(OConnection* _pConnection,SQLHANDLE _pStatementHandle,rtl_TextEncoding _nTextEncoding);
|
||||
~ODatabaseMetaDataResultSet();
|
||||
|
||||
|
||||
inline void* getOdbcFunction(sal_Int32 _nIndex) const
|
||||
{
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: OResultSet.hxx,v $
|
||||
*
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-15 08:18:15 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:47 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -133,6 +133,10 @@ namespace connectivity
|
|||
::com::sun::star::lang::XServiceInfo> OResultSet_BASE;
|
||||
|
||||
|
||||
typedef sal_Int64 TVoidPtr;
|
||||
typedef ::std::allocator< TVoidPtr > TVoidAlloc;
|
||||
typedef ::std::vector<TVoidPtr> TVoidVector;
|
||||
// typedef ::com::sun::star::uno::Sequence<TVoidPtr> TVoidVector;
|
||||
|
||||
class OResultSet : public comphelper::OBaseMutex,
|
||||
public OResultSet_BASE,
|
||||
|
@ -140,7 +144,7 @@ namespace connectivity
|
|||
public ::comphelper::OPropertyArrayUsageHelper<OResultSet>
|
||||
{
|
||||
protected:
|
||||
::std::vector<void*> m_aBindVector;
|
||||
TVoidVector m_aBindVector;
|
||||
::std::vector<sal_Int32> m_aLengthVector;
|
||||
::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime
|
||||
::std::vector< ::com::sun::star::uno::Any> m_aRow; // only used when SQLGetData can't be called in any order
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: OStatement.hxx,v $
|
||||
*
|
||||
* $Revision: 1.12 $
|
||||
* $Revision: 1.13 $
|
||||
*
|
||||
* last change: $Author: oj $ $Date: 2001-05-15 08:18:15 $
|
||||
* last change: $Author: oj $ $Date: 2001-05-17 06:46:46 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -195,6 +195,7 @@ namespace connectivity
|
|||
::com::sun::star::uno::Any& rValue,
|
||||
sal_Int32 nHandle
|
||||
) const;
|
||||
~OStatement_Base(){}
|
||||
public:
|
||||
::cppu::OBroadcastHelper& rBHelper;
|
||||
OStatement_Base(OConnection* _pConnection );
|
||||
|
@ -256,6 +257,8 @@ namespace connectivity
|
|||
public ::com::sun::star::sdbc::XBatchExecution,
|
||||
public ::com::sun::star::lang::XServiceInfo
|
||||
{
|
||||
protected:
|
||||
~OStatement(){}
|
||||
public:
|
||||
// ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
|
||||
OStatement( OConnection* _pConnection) : OStatement_BASE2( _pConnection){}
|
||||
|
|
Loading…
Reference in a new issue