xref: /AOO41X/main/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  *  The Contents of this file are made available subject to the terms of
4*cdf0e10cSrcweir  *  the BSD license.
5*cdf0e10cSrcweir  *
6*cdf0e10cSrcweir  *  Copyright 2000, 2010 Oracle and/or its affiliates.
7*cdf0e10cSrcweir  *  All rights reserved.
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  *  Redistribution and use in source and binary forms, with or without
10*cdf0e10cSrcweir  *  modification, are permitted provided that the following conditions
11*cdf0e10cSrcweir  *  are met:
12*cdf0e10cSrcweir  *  1. Redistributions of source code must retain the above copyright
13*cdf0e10cSrcweir  *     notice, this list of conditions and the following disclaimer.
14*cdf0e10cSrcweir  *  2. Redistributions in binary form must reproduce the above copyright
15*cdf0e10cSrcweir  *     notice, this list of conditions and the following disclaimer in the
16*cdf0e10cSrcweir  *     documentation and/or other materials provided with the distribution.
17*cdf0e10cSrcweir  *  3. Neither the name of Sun Microsystems, Inc. nor the names of its
18*cdf0e10cSrcweir  *     contributors may be used to endorse or promote products derived
19*cdf0e10cSrcweir  *     from this software without specific prior written permission.
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22*cdf0e10cSrcweir  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23*cdf0e10cSrcweir  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24*cdf0e10cSrcweir  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25*cdf0e10cSrcweir  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26*cdf0e10cSrcweir  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27*cdf0e10cSrcweir  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28*cdf0e10cSrcweir  *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29*cdf0e10cSrcweir  *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30*cdf0e10cSrcweir  *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31*cdf0e10cSrcweir  *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32*cdf0e10cSrcweir  *
33*cdf0e10cSrcweir  *************************************************************************/
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include <stdio.h>
36*cdf0e10cSrcweir #include <osl/diagnose.h>
37*cdf0e10cSrcweir #include "SPreparedStatement.hxx"
38*cdf0e10cSrcweir #include <com/sun/star/sdbc/DataType.hpp>
39*cdf0e10cSrcweir #include "SResultSetMetaData.hxx"
40*cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
41*cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
42*cdf0e10cSrcweir #include "propertyids.hxx"
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir using namespace connectivity::skeleton;
45*cdf0e10cSrcweir using namespace com::sun::star::uno;
46*cdf0e10cSrcweir using namespace com::sun::star::lang;
47*cdf0e10cSrcweir using namespace com::sun::star::beans;
48*cdf0e10cSrcweir using namespace com::sun::star::sdbc;
49*cdf0e10cSrcweir using namespace com::sun::star::container;
50*cdf0e10cSrcweir using namespace com::sun::star::io;
51*cdf0e10cSrcweir using namespace com::sun::star::util;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.skeleton.PreparedStatement","com.sun.star.sdbc.PreparedStatement");
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql)
57*cdf0e10cSrcweir 	:OStatement_BASE2(_pConnection)
58*cdf0e10cSrcweir 	,m_aTypeInfo(_TypeInfo)
59*cdf0e10cSrcweir 	,m_bPrepared(sal_False)
60*cdf0e10cSrcweir 	,m_sSqlStatement(sql)
61*cdf0e10cSrcweir 	,m_nNumParams(0)
62*cdf0e10cSrcweir {
63*cdf0e10cSrcweir }
64*cdf0e10cSrcweir // -----------------------------------------------------------------------------
65*cdf0e10cSrcweir OPreparedStatement::~OPreparedStatement()
66*cdf0e10cSrcweir {
67*cdf0e10cSrcweir }
68*cdf0e10cSrcweir // -----------------------------------------------------------------------------
69*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::acquire() throw()
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir 	OStatement_BASE2::acquire();
72*cdf0e10cSrcweir }
73*cdf0e10cSrcweir // -----------------------------------------------------------------------------
74*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::release() throw()
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir 	OStatement_BASE2::release();
77*cdf0e10cSrcweir }
78*cdf0e10cSrcweir // -----------------------------------------------------------------------------
79*cdf0e10cSrcweir Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException)
80*cdf0e10cSrcweir {
81*cdf0e10cSrcweir 	Any aRet = OStatement_BASE2::queryInterface(rType);
82*cdf0e10cSrcweir 	if(!aRet.hasValue())
83*cdf0e10cSrcweir 		aRet = OPreparedStatement_BASE::queryInterface(rType);
84*cdf0e10cSrcweir 	return aRet;
85*cdf0e10cSrcweir }
86*cdf0e10cSrcweir // -------------------------------------------------------------------------
87*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes(  ) throw(::com::sun::star::uno::RuntimeException)
88*cdf0e10cSrcweir {
89*cdf0e10cSrcweir 	return concatSequences(OPreparedStatement_BASE::getTypes(),OStatement_BASE2::getTypes());
90*cdf0e10cSrcweir }
91*cdf0e10cSrcweir // -------------------------------------------------------------------------
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData(  ) throw(SQLException, RuntimeException)
94*cdf0e10cSrcweir {
95*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
96*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir 	if(!m_xMetaData.is())
99*cdf0e10cSrcweir 		m_xMetaData = new OResultSetMetaData(getOwnConnection());
100*cdf0e10cSrcweir 	return m_xMetaData;
101*cdf0e10cSrcweir }
102*cdf0e10cSrcweir // -------------------------------------------------------------------------
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::close(  ) throw(SQLException, RuntimeException)
105*cdf0e10cSrcweir {
106*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
107*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir 	// Reset last warning message
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 	try {
113*cdf0e10cSrcweir 		clearWarnings ();
114*cdf0e10cSrcweir 		OStatement_BASE2::close();
115*cdf0e10cSrcweir 	}
116*cdf0e10cSrcweir 	catch (SQLException &) {
117*cdf0e10cSrcweir 		// If we get an error, ignore
118*cdf0e10cSrcweir 	}
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir 	// Remove this Statement object from the Connection object's
121*cdf0e10cSrcweir 	// list
122*cdf0e10cSrcweir }
123*cdf0e10cSrcweir // -------------------------------------------------------------------------
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir sal_Bool SAL_CALL OPreparedStatement::execute(  ) throw(SQLException, RuntimeException)
126*cdf0e10cSrcweir {
127*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
128*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 	// same as in statement with the difference that this statement also can contain parameter
132*cdf0e10cSrcweir 	return sal_False;
133*cdf0e10cSrcweir }
134*cdf0e10cSrcweir // -------------------------------------------------------------------------
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir sal_Int32 SAL_CALL OPreparedStatement::executeUpdate(  ) throw(SQLException, RuntimeException)
137*cdf0e10cSrcweir {
138*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
139*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir 	// same as in statement with the difference that this statement also can contain parameter
142*cdf0e10cSrcweir 	return 0;
143*cdf0e10cSrcweir }
144*cdf0e10cSrcweir // -------------------------------------------------------------------------
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
147*cdf0e10cSrcweir {
148*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
149*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
150*cdf0e10cSrcweir }
151*cdf0e10cSrcweir // -------------------------------------------------------------------------
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir Reference< XConnection > SAL_CALL OPreparedStatement::getConnection(  ) throw(SQLException, RuntimeException)
154*cdf0e10cSrcweir {
155*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
156*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 	return (Reference< XConnection >)m_pConnection;
159*cdf0e10cSrcweir }
160*cdf0e10cSrcweir // -------------------------------------------------------------------------
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery(  ) throw(SQLException, RuntimeException)
163*cdf0e10cSrcweir {
164*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
165*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 	Reference< XResultSet > rs = NULL;
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir 
170*cdf0e10cSrcweir 	return rs;
171*cdf0e10cSrcweir }
172*cdf0e10cSrcweir // -------------------------------------------------------------------------
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
175*cdf0e10cSrcweir {
176*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
177*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir }
180*cdf0e10cSrcweir // -------------------------------------------------------------------------
181*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
182*cdf0e10cSrcweir {
183*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
184*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir }
188*cdf0e10cSrcweir // -------------------------------------------------------------------------
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
191*cdf0e10cSrcweir {
192*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
193*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir }
196*cdf0e10cSrcweir // -------------------------------------------------------------------------
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
200*cdf0e10cSrcweir {
201*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
202*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir }
205*cdf0e10cSrcweir // -------------------------------------------------------------------------
206*cdf0e10cSrcweir 
207*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
208*cdf0e10cSrcweir {
209*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
210*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir }
213*cdf0e10cSrcweir // -------------------------------------------------------------------------
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
216*cdf0e10cSrcweir {
217*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
218*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir }
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir // -------------------------------------------------------------------------
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
225*cdf0e10cSrcweir {
226*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
227*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir }
230*cdf0e10cSrcweir // -------------------------------------------------------------------------
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
233*cdf0e10cSrcweir {
234*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
235*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir }
238*cdf0e10cSrcweir // -------------------------------------------------------------------------
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
241*cdf0e10cSrcweir {
242*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
243*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir }
246*cdf0e10cSrcweir // -------------------------------------------------------------------------
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
249*cdf0e10cSrcweir {
250*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
251*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir }
254*cdf0e10cSrcweir // -------------------------------------------------------------------------
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
257*cdf0e10cSrcweir {
258*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
259*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
260*cdf0e10cSrcweir 
261*cdf0e10cSrcweir }
262*cdf0e10cSrcweir // -------------------------------------------------------------------------
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
265*cdf0e10cSrcweir {
266*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
267*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir }
270*cdf0e10cSrcweir // -------------------------------------------------------------------------
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
273*cdf0e10cSrcweir {
274*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
275*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir }
278*cdf0e10cSrcweir // -------------------------------------------------------------------------
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
281*cdf0e10cSrcweir {
282*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
283*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir }
286*cdf0e10cSrcweir // -------------------------------------------------------------------------
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
289*cdf0e10cSrcweir {
290*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
291*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir }
294*cdf0e10cSrcweir // -------------------------------------------------------------------------
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
297*cdf0e10cSrcweir {
298*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
299*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir }
302*cdf0e10cSrcweir // -------------------------------------------------------------------------
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
305*cdf0e10cSrcweir {
306*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
307*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir // -------------------------------------------------------------------------
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
313*cdf0e10cSrcweir {
314*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
315*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir }
318*cdf0e10cSrcweir // -------------------------------------------------------------------------
319*cdf0e10cSrcweir 
320*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
321*cdf0e10cSrcweir {
322*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
323*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir }
326*cdf0e10cSrcweir // -------------------------------------------------------------------------
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
330*cdf0e10cSrcweir {
331*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
332*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir }
335*cdf0e10cSrcweir // -------------------------------------------------------------------------
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
338*cdf0e10cSrcweir {
339*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
340*cdf0e10cSrcweir 	checkDisposed(OStatement_BASE::rBHelper.bDisposed);
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir }
343*cdf0e10cSrcweir // -------------------------------------------------------------------------
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::clearParameters(  ) throw(SQLException, RuntimeException)
346*cdf0e10cSrcweir {
347*cdf0e10cSrcweir }
348*cdf0e10cSrcweir // -------------------------------------------------------------------------
349*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::clearBatch(  ) throw(SQLException, RuntimeException)
350*cdf0e10cSrcweir {
351*cdf0e10cSrcweir }
352*cdf0e10cSrcweir // -------------------------------------------------------------------------
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir void SAL_CALL OPreparedStatement::addBatch( ) throw(SQLException, RuntimeException)
355*cdf0e10cSrcweir {
356*cdf0e10cSrcweir }
357*cdf0e10cSrcweir // -------------------------------------------------------------------------
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch(  ) throw(SQLException, RuntimeException)
360*cdf0e10cSrcweir {
361*cdf0e10cSrcweir 	return Sequence< sal_Int32 > ();
362*cdf0e10cSrcweir }
363*cdf0e10cSrcweir // -------------------------------------------------------------------------
364*cdf0e10cSrcweir void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
365*cdf0e10cSrcweir {
366*cdf0e10cSrcweir 	switch(nHandle)
367*cdf0e10cSrcweir 	{
368*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
369*cdf0e10cSrcweir 			break;
370*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
371*cdf0e10cSrcweir 			break;
372*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
373*cdf0e10cSrcweir 			break;
374*cdf0e10cSrcweir 		case PROPERTY_ID_USEBOOKMARKS:
375*cdf0e10cSrcweir 			break;
376*cdf0e10cSrcweir 		default:
377*cdf0e10cSrcweir 			OStatement_Base::setFastPropertyValue_NoBroadcast(nHandle,rValue);
378*cdf0e10cSrcweir 	}
379*cdf0e10cSrcweir }
380*cdf0e10cSrcweir // -----------------------------------------------------------------------------
381*cdf0e10cSrcweir void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex)
382*cdf0e10cSrcweir {
383*cdf0e10cSrcweir 	if(	!_parameterIndex || _parameterIndex > m_nNumParams)
384*cdf0e10cSrcweir 		throw SQLException();
385*cdf0e10cSrcweir }
386*cdf0e10cSrcweir // -----------------------------------------------------------------------------
387*cdf0e10cSrcweir 
388*cdf0e10cSrcweir 
389