Tag: cws_src680_dba24d User: oj Date: 2007-11-06 09:07:52+0000 Modified: dba/connectivity/source/drivers/odbc/OStatement.cxx dba/connectivity/source/drivers/odbc/OPreparedStatement.cxx dba/connectivity/source/drivers/mozab/MResultSet.cxx dba/connectivity/source/drivers/file/FPreparedStatement.cxx dba/connectivity/source/drivers/ado/APreparedStatement.cxx dba/connectivity/source/commontools/dbtools.cxx
Log: #i51965# impl updateNumericObject and setObjectWithInfo File Changes: Directory: /dba/connectivity/source/drivers/odbc/ ================================================= File [changed]: OStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OStatement.cxx?r1=1.37&r2=1.37.152.1 Delta lines: +12 -4 -------------------- --- OStatement.cxx 2006-09-17 03:07:43+0000 1.37 +++ OStatement.cxx 2007-11-06 09:07:48+0000 1.37.152.1 @@ -4,9 +4,9 @@ * * $RCSfile: OStatement.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.37.152.1 $ * - * last change: $Author: obo $ $Date: 2006/09/17 03:07:43 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:48 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1007,6 +1007,9 @@ case PROPERTY_ID_USEBOOKMARKS: bConverted = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, isUsingBookmarks()); break; + case PROPERTY_ID_ESCAPEPROCESSING: + bConverted = ::comphelper::tryPropertyValue(rConvertedValue, rOldValue, rValue, sal_True); + break; default: ; @@ -1052,6 +1055,8 @@ case PROPERTY_ID_USEBOOKMARKS: setUsingBookmarks(comphelper::getBOOL(rValue)); break; + case PROPERTY_ID_ESCAPEPROCESSING: + break; default: ; } @@ -1091,7 +1096,10 @@ rValue <<= getFetchSize(); break; case PROPERTY_ID_USEBOOKMARKS: - rValue <<= cppu::bool2any(isUsingBookmarks()); + rValue <<= isUsingBookmarks(); + break; + case PROPERTY_ID_ESCAPEPROCESSING: + rValue <<= sal_True; break; default: ; File [changed]: OPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/odbc/OPreparedStatement.cxx?r1=1.44&r2=1.44.18.1 Delta lines: +7 -3 ------------------- --- OPreparedStatement.cxx 2007-09-26 14:30:18+0000 1.44 +++ OPreparedStatement.cxx 2007-11-06 09:07:49+0000 1.44.18.1 @@ -4,9 +4,9 @@ * * $RCSfile: OPreparedStatement.cxx,v $ * - * $Revision: 1.44 $ + * $Revision: 1.44.18.1 $ * - * last change: $Author: hr $ $Date: 2007/09/26 14:30:18 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:49 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -572,6 +572,10 @@ else setNull(parameterIndex,sqlType); break; + case DataType::DECIMAL: + case DataType::NUMERIC: + setString(parameterIndex,::comphelper::getString(x)); + break; default: ::dbtools::setObjectWithInfo(this,parameterIndex,x,sqlType,scale); } Directory: /dba/connectivity/source/drivers/mozab/ ================================================== File [changed]: MResultSet.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/MResultSet.cxx?r1=1.29&r2=1.29.140.1 Delta lines: +6 -5 ------------------- --- MResultSet.cxx 2006-10-18 13:08:42+0000 1.29 +++ MResultSet.cxx 2007-11-06 09:07:49+0000 1.29.140.1 @@ -4,9 +4,9 @@ * * $RCSfile: MResultSet.cxx,v $ * - * $Revision: 1.29 $ + * $Revision: 1.29.140.1 $ * - * last change: $Author: ihi $ $Date: 2006/10/18 13:08:42 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:49 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1862,9 +1862,10 @@ } // ------------------------------------------------------------------------- -void SAL_CALL OResultSet::updateNumericObject( sal_Int32 /*columnIndex*/, const Any& /*x*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) +void SAL_CALL OResultSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) { - ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::updateNumericObject", *this ); + if (!::dbtools::implUpdateObject(this, columnIndex, x)) + ::dbtools::throwGenericSQLException(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Error updating object")),*this); } // XResultSetUpdate Directory: /dba/connectivity/source/drivers/file/ ================================================= File [changed]: FPreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/file/FPreparedStatement.cxx?r1=1.40&r2=1.40.20.1 Delta lines: +13 -4 -------------------- --- FPreparedStatement.cxx 2007-09-26 14:28:47+0000 1.40 +++ FPreparedStatement.cxx 2007-11-06 09:07:49+0000 1.40.20.1 @@ -4,9 +4,9 @@ * * $RCSfile: FPreparedStatement.cxx,v $ * - * $Revision: 1.40 $ + * $Revision: 1.40.20.1 $ * - * last change: $Author: hr $ $Date: 2007/09/26 14:28:47 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:49 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -349,7 +349,16 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { + switch(sqlType) + { + case DataType::DECIMAL: + case DataType::NUMERIC: + setString(parameterIndex,::comphelper::getString(x)); + break; + default: ::dbtools::setObjectWithInfo(this,parameterIndex,x,sqlType,scale); + break; + } } // ------------------------------------------------------------------------- Directory: /dba/connectivity/source/drivers/ado/ ================================================ File [changed]: APreparedStatement.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/APreparedStatement.cxx?r1=1.24&r2=1.24.20.1 Delta lines: +15 -6 -------------------- --- APreparedStatement.cxx 2007-09-26 14:28:22+0000 1.24 +++ APreparedStatement.cxx 2007-11-06 09:07:49+0000 1.24.20.1 @@ -4,9 +4,9 @@ * * $RCSfile: APreparedStatement.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.24.20.1 $ * - * last change: $Author: hr $ $Date: 2007/09/26 14:28:22 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:49 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -66,7 +66,7 @@ #ifndef _DBHELPER_DBEXCEPTION_HXX_ #include "connectivity/dbexception.hxx" #endif - +#include "connectivity/dbtools.hxx" #define CHECK_RETURN(x) \ if(!x) \ @@ -436,9 +436,18 @@ } // ------------------------------------------------------------------------- -void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 /*parameterIndex*/, const Any& /*x*/, sal_Int32 /*sqlType*/, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException) +void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException) { - ::dbtools::throwFeatureNotImplementedException( "XRowUpdate::setObjectWithInfo", *this ); + switch(sqlType) + { + case DataType::DECIMAL: + case DataType::NUMERIC: + setString(parameterIndex,::comphelper::getString(x)); + break; + default: + ::dbtools::setObjectWithInfo(this,parameterIndex,x,sqlType,scale); + break; + } } // ------------------------------------------------------------------------- Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbtools.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbtools.cxx?r1=1.68&r2=1.68.54.1 Delta lines: +9 -5 ------------------- --- dbtools.cxx 2007-07-06 06:47:28+0000 1.68 +++ dbtools.cxx 2007-11-06 09:07:50+0000 1.68.54.1 @@ -4,9 +4,9 @@ * * $RCSfile: dbtools.cxx,v $ * - * $Revision: 1.68 $ + * $Revision: 1.68.54.1 $ * - * last change: $Author: rt $ $Date: 2007/07/06 06:47:28 $ + * last change: $Author: oj $ $Date: 2007/11/06 09:07:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1878,10 +1878,14 @@ { switch(sqlType) { - case DataType::CHAR: - case DataType::VARCHAR: case DataType::DECIMAL: case DataType::NUMERIC: + _xParams->setObjectWithInfo(parameterIndex,x,sqlType,0); + break; + case DataType::CHAR: + case DataType::VARCHAR: + //case DataType::DECIMAL: + //case DataType::NUMERIC: case DataType::LONGVARCHAR: _xParams->setString(parameterIndex,::comphelper::getString(x)); break; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
