diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index dee11589b1b6..13a1613d3740 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CacheSet.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: oj $ $Date: 2001-05-18 11:48:25 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:08:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -525,6 +525,8 @@ void OCacheSet::setParameter(sal_Int32 nPos,Reference< XParameters > _xParameter break; } } + else + _xParameter->setNull(nPos,_rValue.getTypeKind()); } // ------------------------------------------------------------------------- void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) @@ -591,6 +593,9 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition) /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.21 2001/05/18 11:48:25 oj + #86528# size changes + Revision 1.20 2001/05/03 07:15:56 oj #86526# fetch decimal and numeric as string diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index ed506737fcf8..4afa99da8a90 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: KeySet.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: oj $ $Date: 2001-05-18 11:48:25 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:08:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -995,8 +995,8 @@ namespace dbaccess if(bCase(sRealName,*pTableBegin) && bCase(_rsUpdateTableName,sTableName) && _rColumnNames.find(*pTableBegin) == _rColumnNames.end()) { _rColumnNames[sRealName] = nPos; - if((sal_Int32)_rColumnNames.size() == aTableNames.getLength()) - return; // early break we found all columns +// if((sal_Int32)_rColumnNames.size() == aTableNames.getLength()) +// return; // early break we found all columns break; } } @@ -1007,6 +1007,9 @@ namespace dbaccess /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.16 2001/05/18 11:48:25 oj + #86528# size changes + Revision 1.15 2001/05/03 07:15:56 oj #86526# fetch decimal and numeric as string diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 08dedb865a6c..17f7b6716358 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RowSet.cxx,v $ * - * $Revision: 1.68 $ + * $Revision: 1.69 $ * - * last change: $Author: tbe $ $Date: 2001-05-14 09:46:14 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:08:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1980,6 +1980,21 @@ void ORowSet::execute_NoApprove_NoNewConn(ClearableMutexGuard& _rClearForNotific m_xColumns->getByName(sName) >>= xColumn; if (!xColumn.is() && m_xColumns->hasByName(xMeta->getColumnLabel(i))) m_xColumns->getByName(xMeta->getColumnLabel(i)) >>= xColumn; + if(!xColumn.is()) + { + // no column found so we could look at the position i + Reference xIndexAccess(m_xColumns,UNO_QUERY); + if(xIndexAccess.is() && i <= xIndexAccess->getCount()) + { + xIndexAccess->getByIndex(i-1) >>= xColumn; + } + else + { + Sequence< ::rtl::OUString> aSeq = m_xColumns->getElementNames(); + if( i <= aSeq.getLength()) + m_xColumns->getByName(aSeq.getConstArray()[i-1]) >>= xColumn; + } + } DBG_ASSERT(xColumn.is(), "ORowSet::execute_NoApprove_NoNewConn: invalid column (NULL)!"); Reference xInfo = xColumn.is() ? xColumn->getPropertySetInfo() : Reference(); diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 6c81f7282fa0..ad7adf6ebab0 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RowSetCache.cxx,v $ * - * $Revision: 1.34 $ + * $Revision: 1.35 $ * - * last change: $Author: oj $ $Date: 2001-05-11 06:14:11 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:08:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1629,7 +1629,10 @@ void SAL_CALL ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow ) th moveToBookmark((*(*_rUpdateRow))[0].makeAny()); m_pCacheSet->updateRow(*_rUpdateRow,*m_aMatrixIter,m_aUpdateTable); - *(*m_aMatrixIter) = *(*_rUpdateRow); + // *(*m_aMatrixIter) = *(*_rUpdateRow); + // refetch the whole row + (*m_aMatrixIter) = NULL; + moveToBookmark((*(*_rUpdateRow))[0].makeAny()); // moveToBookmark((*(*m_aInsertRow))[0].makeAny()); // if(m_pCacheSet->rowUpdated()) @@ -1816,6 +1819,9 @@ void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRo /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.34 2001/05/11 06:14:11 oj + #86724# clear updaterow after update + Revision 1.33 2001/05/10 14:09:19 oj #86724# check null values and you of correct assignment diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index fb0c087502bd..afd402b319a5 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: querycomposer.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: oj $ $Date: 2001-05-18 12:02:50 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:08:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,6 +128,9 @@ #ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include #endif +#ifndef _CONNECTIVITY_SDBCX_COLUMN_HXX_ +#include +#endif using namespace dbaccess; @@ -474,8 +477,24 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S else { // we can now only look if we found it under the realname propertery aFind = ::connectivity::findRealName(aCols->begin(),aCols->end(),sName,bCase); - if(aFind != aCols->end()) + + if(i <= aCols->size()) + { aNames.push_back(sName); + if(aFind == aCols->end()) + { // here we have to make the assumption that the postion is correct + OSQLColumns::iterator aFind2 = aCols->begin() + i-1; + Reference xProp(*aFind2,UNO_QUERY); + if(xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_REALNAME)) + { + ::connectivity::parse::OParseColumn* pColumn = new ::connectivity::parse::OParseColumn(xProp,m_xConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); + pColumn->setName(sName); + pColumn->setRealName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_REALNAME))); + pColumn->setTableName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_TABLENAME))); + (*aCols)[i-1] = pColumn; + } + } + } } } ::comphelper::disposeComponent(xStmt); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 84befa4b1003..17f74449f4b7 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.69 $ + * $Revision: 1.70 $ * - * last change: $Author: oj $ $Date: 2001-05-21 11:24:16 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:04:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1131,18 +1131,24 @@ void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::sta // ------------------------------------------------------------------------- void SbaTableQueryBrowser::RowChanged() { - SbaGridControl* pControl = getBrowserView()->getVclControl(); - if (!pControl->IsEditing()) - InvalidateFeature(ID_BROWSER_COPY); + if(getBrowserView()) + { + SbaGridControl* pControl = getBrowserView()->getVclControl(); + if (!pControl->IsEditing()) + InvalidateFeature(ID_BROWSER_COPY); + } SbaXDataBrowserController::RowChanged(); } // ------------------------------------------------------------------------- void SbaTableQueryBrowser::ColumnChanged() { - SbaGridControl* pControl = getBrowserView()->getVclControl(); - if (!pControl->IsEditing()) - InvalidateFeature(ID_BROWSER_COPY); + if(getBrowserView()) + { + SbaGridControl* pControl = getBrowserView()->getVclControl(); + if (!pControl->IsEditing()) + InvalidateFeature(ID_BROWSER_COPY); + } SbaXDataBrowserController::ColumnChanged(); } diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx index aeed1fd26ad2..24e564caaf3a 100644 --- a/dbaccess/source/ui/inc/TableController.hxx +++ b/dbaccess/source/ui/inc/TableController.hxx @@ -2,9 +2,9 @@ * * $RCSfile: TableController.hxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: fs $ $Date: 2001-05-10 12:17:27 $ + * last change: $Author: oj $ $Date: 2001-05-22 13:04:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,6 +136,7 @@ namespace dbaui void setColumnProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,const OFieldDescription* _pFieldDesc); ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getKeyColumns() const; ::rtl::OUString createUniqueName(const ::rtl::OUString& _rName); + void setTitle(const ::rtl::OUString & _rTitle); protected: virtual String getMenu() const;