User: rt      
Date: 2008-01-30 07:55:11+0000
Modified:
   dba/connectivity/source/drivers/jdbc/ResultSet.cxx

Log:
 INTEGRATION: CWS dba24d (1.31.54); FILE MERGED
 2007/11/06 09:04:02 oj 1.31.54.1: #i51965# impl updateNumericObject and 
setObjectWithInfo

File Changes:

Directory: /dba/connectivity/source/drivers/jdbc/
=================================================

File [changed]: ResultSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/jdbc/ResultSet.cxx?r1=1.32&r2=1.33
Delta lines:  +36 -2
--------------------
--- ResultSet.cxx       2007-11-27 12:03:05+0000        1.32
+++ ResultSet.cxx       2008-01-30 07:55:08+0000        1.33
@@ -38,6 +38,7 @@
 #ifndef _CONNECTIVITY_JAVA_SQL_RESULTSET_HXX_
 #include "java/sql/ResultSet.hxx"
 #endif
+#include "java/math/BigDecimal.hxx"
 #ifndef _CONNECTIVITY_JAVA_SQL_STATEMENT_HXX_
 #include "java/sql/JStatement.hxx"
 #endif
@@ -1580,10 +1581,43 @@
 }
 // -------------------------------------------------------------------------
 
-void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, 
const ::com::sun::star::uno::Any& x, sal_Int32 /*scale*/ ) 
throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
+void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, 
const ::com::sun::star::uno::Any& x, sal_Int32 scale ) 
throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)
 {
        //      OSL_ENSURE(0,"java_sql_ResultSet::updateNumericObject: NYI");
+    try
+    {
+        SDBThreadAttach t;
+           if( t.pEnv )
+           {
+
+                   // temporaere Variable initialisieren
+                   static const char * cSignature = "(ILjava/lang/Object;I)V";
+                   static const char * cMethodName = "updateObject";
+                   // Java-Call absetzen
+                   static jmethodID mID = NULL;
+                   if ( !mID  )
+                           mID  = t.pEnv->GetMethodID( getMyClass(), 
cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+                   if( mID )
+                   {
+                           // Parameter konvertieren
+                double nTemp = 0.0;
+                ::std::auto_ptr<java_math_BigDecimal> pBigDecimal;
+                if ( x >>= nTemp)
+                {
+                    pBigDecimal.reset(new java_math_BigDecimal(nTemp));
+                }
+                else
+                    pBigDecimal.reset(new 
java_math_BigDecimal(::comphelper::getString(x)));
+                    //obj = 
convertwchar_tToJavaString(t.pEnv,::comphelper::getString(x));
+                t.pEnv->CallVoidMethod( object, mID, 
columnIndex,pBigDecimal->getJavaObject(),scale);
+                ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+                   }
+           }
+    }
+    catch(Exception)
+    {
        updateObject( columnIndex,x);
+    }
 }
 
//------------------------------------------------------------------------------
 sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const 
throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to