Tag: cws_dev300_dba30d
User: fs      
Date: 2008-05-28 19:16:55+0000
Modified:
   dba/connectivity/source/drivers/ado/APreparedStatement.cxx

Log:
 #i87514# setString: pass the maximum size (as defined in ADO's 
Parameter::Size) for the parameter, not the actual size - the lattter is 0 for 
an empty string, which doesn't work

File Changes:

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.26&r2=1.26.20.1
Delta lines:  +5 -3
-------------------
--- APreparedStatement.cxx      2008-04-10 08:22:12+0000        1.26
+++ APreparedStatement.cxx      2008-05-28 19:16:52+0000        1.26.20.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: APreparedStatement.cxx,v $
- * $Revision: 1.26 $
+ * $Revision: 1.26.20.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -42,6 +42,8 @@
 #include "connectivity/dbexception.hxx"
 #include "connectivity/dbtools.hxx"
 
+#include <limits>
+
 #define CHECK_RETURN(x)                                                        
                                                \
        if(!x)                                                                  
                                                        \
                ADOS::ThrowException(*m_pConnection->getConnection(),*this);
@@ -271,7 +273,7 @@
 // -------------------------------------------------------------------------
 void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const 
::rtl::OUString& x ) throw(SQLException, RuntimeException)
 {
-       setParameter(parameterIndex,adLongVarWChar,x.getLength(),x);
+    setParameter( parameterIndex, adLongVarWChar, ::std::numeric_limits< 
sal_Int32 >::max(), x );
 }
 // -------------------------------------------------------------------------
 




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

Reply via email to