xref: /AOO41X/main/connectivity/source/drivers/macab/MacabPreparedStatement.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_connectivity.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "MacabPreparedStatement.hxx"
32*cdf0e10cSrcweir #include "MacabAddressBook.hxx"
33*cdf0e10cSrcweir #include "propertyids.hxx"
34*cdf0e10cSrcweir #include <connectivity/dbexception.hxx>
35*cdf0e10cSrcweir #include "connectivity/dbtools.hxx"
36*cdf0e10cSrcweir #include "resource/macab_res.hrc"
37*cdf0e10cSrcweir #include "resource/sharedresources.hxx"
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir using namespace connectivity::macab;
40*cdf0e10cSrcweir using namespace com::sun::star::uno;
41*cdf0e10cSrcweir using namespace com::sun::star::lang;
42*cdf0e10cSrcweir using namespace com::sun::star::sdbc;
43*cdf0e10cSrcweir using namespace com::sun::star::util;
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir IMPLEMENT_SERVICE_INFO(MacabPreparedStatement, "com.sun.star.sdbc.drivers.MacabPreparedStatement", "com.sun.star.sdbc.PreparedStatement");
46*cdf0e10cSrcweir // -------------------------------------------------------------------------
47*cdf0e10cSrcweir void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams) throw(SQLException)
48*cdf0e10cSrcweir {
49*cdf0e10cSrcweir 	if ( !m_aParameterRow.isValid() )
50*cdf0e10cSrcweir 		m_aParameterRow = new OValueVector();
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir 	if (nParams < 1)
53*cdf0e10cSrcweir 		::dbtools::throwInvalidIndexException(*(MacabPreparedStatement *) this,Any());
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir 	if (nParams >= (sal_Int32) (m_aParameterRow->get()).size())
56*cdf0e10cSrcweir 		(m_aParameterRow->get()).resize(nParams);
57*cdf0e10cSrcweir }
58*cdf0e10cSrcweir // -------------------------------------------------------------------------
59*cdf0e10cSrcweir void MacabPreparedStatement::setMacabFields() const throw(SQLException)
60*cdf0e10cSrcweir {
61*cdf0e10cSrcweir 	::vos::ORef<connectivity::OSQLColumns> xColumns;	// selected columns
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 	xColumns = m_aSQLIterator.getSelectColumns();
64*cdf0e10cSrcweir 	if (!xColumns.isValid())
65*cdf0e10cSrcweir 	{
66*cdf0e10cSrcweir 		::connectivity::SharedResources aResources;
67*cdf0e10cSrcweir         const ::rtl::OUString sError( aResources.getResourceString(
68*cdf0e10cSrcweir                 STR_INVALID_COLUMN_SELECTION
69*cdf0e10cSrcweir              ) );
70*cdf0e10cSrcweir 	    ::dbtools::throwGenericSQLException(sError,NULL);
71*cdf0e10cSrcweir 	}
72*cdf0e10cSrcweir 	m_xMetaData->setMacabFields(xColumns);
73*cdf0e10cSrcweir }
74*cdf0e10cSrcweir // -------------------------------------------------------------------------
75*cdf0e10cSrcweir void MacabPreparedStatement::resetParameters() const throw(SQLException)
76*cdf0e10cSrcweir {
77*cdf0e10cSrcweir 	m_nParameterIndex = 0;
78*cdf0e10cSrcweir }
79*cdf0e10cSrcweir // -------------------------------------------------------------------------
80*cdf0e10cSrcweir void MacabPreparedStatement::getNextParameter(::rtl::OUString &rParameter) const throw(SQLException)
81*cdf0e10cSrcweir {
82*cdf0e10cSrcweir 	if (m_nParameterIndex >= (sal_Int32) (m_aParameterRow->get()).size())
83*cdf0e10cSrcweir     {
84*cdf0e10cSrcweir         ::connectivity::SharedResources aResources;
85*cdf0e10cSrcweir         const ::rtl::OUString sError( aResources.getResourceString(
86*cdf0e10cSrcweir                 STR_INVALID_PARA_COUNT
87*cdf0e10cSrcweir              ) );
88*cdf0e10cSrcweir 	    ::dbtools::throwGenericSQLException(sError,*(MacabPreparedStatement *) this);
89*cdf0e10cSrcweir     }
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 	rParameter = (m_aParameterRow->get())[m_nParameterIndex];
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir 	m_nParameterIndex++;
94*cdf0e10cSrcweir }
95*cdf0e10cSrcweir // -------------------------------------------------------------------------
96*cdf0e10cSrcweir MacabPreparedStatement::MacabPreparedStatement(
97*cdf0e10cSrcweir 	MacabConnection* _pConnection,
98*cdf0e10cSrcweir 	const ::rtl::OUString& sql)
99*cdf0e10cSrcweir 	: MacabPreparedStatement_BASE(_pConnection),
100*cdf0e10cSrcweir 	  m_sSqlStatement(sql),
101*cdf0e10cSrcweir 	  m_bPrepared(sal_False),
102*cdf0e10cSrcweir 	  m_nParameterIndex(0),
103*cdf0e10cSrcweir 	  m_aParameterRow()
104*cdf0e10cSrcweir {
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir }
107*cdf0e10cSrcweir // -------------------------------------------------------------------------
108*cdf0e10cSrcweir MacabPreparedStatement::~MacabPreparedStatement()
109*cdf0e10cSrcweir {
110*cdf0e10cSrcweir }
111*cdf0e10cSrcweir // -------------------------------------------------------------------------
112*cdf0e10cSrcweir void MacabPreparedStatement::disposing()
113*cdf0e10cSrcweir {
114*cdf0e10cSrcweir 	MacabPreparedStatement_BASE::disposing();
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	if (m_aParameterRow.isValid())
117*cdf0e10cSrcweir 	{
118*cdf0e10cSrcweir 		m_aParameterRow->get().clear();
119*cdf0e10cSrcweir 		m_aParameterRow = NULL;
120*cdf0e10cSrcweir 	}
121*cdf0e10cSrcweir }
122*cdf0e10cSrcweir // -------------------------------------------------------------------------
123*cdf0e10cSrcweir Reference< XResultSetMetaData > SAL_CALL MacabPreparedStatement::getMetaData() throw(SQLException, RuntimeException)
124*cdf0e10cSrcweir {
125*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
126*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 	if (!m_xMetaData.is())
129*cdf0e10cSrcweir 	{
130*cdf0e10cSrcweir 		const OSQLTables& xTabs = m_aSQLIterator.getTables();
131*cdf0e10cSrcweir 		::rtl::OUString sTableName = MacabAddressBook::getDefaultTableName();
132*cdf0e10cSrcweir 
133*cdf0e10cSrcweir 		if(! xTabs.empty() )
134*cdf0e10cSrcweir 		{
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir 			// can only deal with one table at a time
137*cdf0e10cSrcweir 			if(xTabs.size() == 1 && !m_aSQLIterator.hasErrors() )
138*cdf0e10cSrcweir 				sTableName = xTabs.begin()->first;
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 		}
141*cdf0e10cSrcweir 		m_xMetaData = new MacabResultSetMetaData(getOwnConnection(),sTableName);
142*cdf0e10cSrcweir 		setMacabFields();
143*cdf0e10cSrcweir 	}
144*cdf0e10cSrcweir 	Reference< XResultSetMetaData > xMetaData = m_xMetaData.get();
145*cdf0e10cSrcweir 	return xMetaData;
146*cdf0e10cSrcweir }
147*cdf0e10cSrcweir // -------------------------------------------------------------------------
148*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::close() throw(SQLException, RuntimeException)
149*cdf0e10cSrcweir {
150*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
151*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir 	// Reset last warning message
154*cdf0e10cSrcweir 	try {
155*cdf0e10cSrcweir 		clearWarnings ();
156*cdf0e10cSrcweir 		MacabCommonStatement::close();
157*cdf0e10cSrcweir 	}
158*cdf0e10cSrcweir 	catch (SQLException &) {
159*cdf0e10cSrcweir 		// If we get an error, ignore
160*cdf0e10cSrcweir 	}
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	// Remove this Statement object from the Connection object's
163*cdf0e10cSrcweir 	// list
164*cdf0e10cSrcweir }
165*cdf0e10cSrcweir // -------------------------------------------------------------------------
166*cdf0e10cSrcweir sal_Bool SAL_CALL MacabPreparedStatement::execute() throw(SQLException, RuntimeException)
167*cdf0e10cSrcweir {
168*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
169*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir 	Reference< XResultSet> xRS = MacabCommonStatement::executeQuery(m_sSqlStatement);
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir 	return xRS.is();
174*cdf0e10cSrcweir }
175*cdf0e10cSrcweir // -------------------------------------------------------------------------
176*cdf0e10cSrcweir sal_Int32 SAL_CALL MacabPreparedStatement::executeUpdate() throw(SQLException, RuntimeException)
177*cdf0e10cSrcweir {
178*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
179*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 	// same as in statement with the difference that this statement also can contain parameter
182*cdf0e10cSrcweir 	return 0;
183*cdf0e10cSrcweir }
184*cdf0e10cSrcweir // -------------------------------------------------------------------------
185*cdf0e10cSrcweir Reference< XConnection > SAL_CALL MacabPreparedStatement::getConnection() throw(SQLException, RuntimeException)
186*cdf0e10cSrcweir {
187*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
188*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir 	return (Reference< XConnection >) m_pConnection;
191*cdf0e10cSrcweir }
192*cdf0e10cSrcweir // -------------------------------------------------------------------------
193*cdf0e10cSrcweir Reference< XResultSet > SAL_CALL MacabPreparedStatement::executeQuery() throw(SQLException, RuntimeException)
194*cdf0e10cSrcweir {
195*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
196*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
197*cdf0e10cSrcweir 
198*cdf0e10cSrcweir 	Reference< XResultSet > rs = MacabCommonStatement::executeQuery(m_sSqlStatement);
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir 	return rs;
201*cdf0e10cSrcweir }
202*cdf0e10cSrcweir // -------------------------------------------------------------------------
203*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) throw(SQLException, RuntimeException)
204*cdf0e10cSrcweir {
205*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
206*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 	checkAndResizeParameters(parameterIndex);
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	(m_aParameterRow->get())[parameterIndex - 1].setNull();
211*cdf0e10cSrcweir }
212*cdf0e10cSrcweir // -------------------------------------------------------------------------
213*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const ::rtl::OUString&) throw(SQLException, RuntimeException)
214*cdf0e10cSrcweir {
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setObjectNull", NULL);
219*cdf0e10cSrcweir }
220*cdf0e10cSrcweir // -------------------------------------------------------------------------
221*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException)
222*cdf0e10cSrcweir {
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setBoolean", NULL);
227*cdf0e10cSrcweir }
228*cdf0e10cSrcweir // -------------------------------------------------------------------------
229*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException)
230*cdf0e10cSrcweir {
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setByte", NULL);
235*cdf0e10cSrcweir }
236*cdf0e10cSrcweir // -------------------------------------------------------------------------
237*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException)
238*cdf0e10cSrcweir {
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setShort", NULL);
243*cdf0e10cSrcweir }
244*cdf0e10cSrcweir // -------------------------------------------------------------------------
245*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
246*cdf0e10cSrcweir {
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setInt", NULL);
251*cdf0e10cSrcweir }
252*cdf0e10cSrcweir // -------------------------------------------------------------------------
253*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException)
254*cdf0e10cSrcweir {
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setLong", NULL);
259*cdf0e10cSrcweir }
260*cdf0e10cSrcweir // -------------------------------------------------------------------------
261*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException)
262*cdf0e10cSrcweir {
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setFloat", NULL);
267*cdf0e10cSrcweir }
268*cdf0e10cSrcweir // -------------------------------------------------------------------------
269*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException)
270*cdf0e10cSrcweir {
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir 
274*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setDouble", NULL);
275*cdf0e10cSrcweir }
276*cdf0e10cSrcweir // -------------------------------------------------------------------------
277*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const ::rtl::OUString &x) throw(SQLException, RuntimeException)
278*cdf0e10cSrcweir {
279*cdf0e10cSrcweir 	::osl::MutexGuard aGuard( m_aMutex );
280*cdf0e10cSrcweir 	checkDisposed(MacabCommonStatement_BASE::rBHelper.bDisposed);
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir 	checkAndResizeParameters(parameterIndex);
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir 	(m_aParameterRow->get())[parameterIndex - 1] = x;
285*cdf0e10cSrcweir }
286*cdf0e10cSrcweir // -------------------------------------------------------------------------
287*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException)
288*cdf0e10cSrcweir {
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setBytes", NULL);
293*cdf0e10cSrcweir }
294*cdf0e10cSrcweir // -------------------------------------------------------------------------
295*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException)
296*cdf0e10cSrcweir {
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setDate", NULL);
301*cdf0e10cSrcweir }
302*cdf0e10cSrcweir // -------------------------------------------------------------------------
303*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException)
304*cdf0e10cSrcweir {
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setTime", NULL);
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir // -------------------------------------------------------------------------
311*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException)
312*cdf0e10cSrcweir {
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir 
316*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setTimestamp", NULL);
317*cdf0e10cSrcweir }
318*cdf0e10cSrcweir // -------------------------------------------------------------------------
319*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
320*cdf0e10cSrcweir {
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setBinaryStream", NULL);
325*cdf0e10cSrcweir }
326*cdf0e10cSrcweir // -------------------------------------------------------------------------
327*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException)
328*cdf0e10cSrcweir {
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setCharacterStream", NULL);
333*cdf0e10cSrcweir }
334*cdf0e10cSrcweir // -------------------------------------------------------------------------
335*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException)
336*cdf0e10cSrcweir {
337*cdf0e10cSrcweir 	if(!::dbtools::implSetObject(this,parameterIndex,x))
338*cdf0e10cSrcweir 	{
339*cdf0e10cSrcweir         const ::rtl::OUString sError( m_pConnection->getResources().getResourceStringWithSubstitution(
340*cdf0e10cSrcweir                 STR_UNKNOWN_PARA_TYPE,
341*cdf0e10cSrcweir                 "$position$", ::rtl::OUString::valueOf(parameterIndex)
342*cdf0e10cSrcweir              ) );
343*cdf0e10cSrcweir 		::dbtools::throwGenericSQLException(sError,*this);
344*cdf0e10cSrcweir 	}
345*cdf0e10cSrcweir }
346*cdf0e10cSrcweir // -------------------------------------------------------------------------
347*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException)
348*cdf0e10cSrcweir {
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setObjectWithInfo", NULL);
353*cdf0e10cSrcweir }
354*cdf0e10cSrcweir // -------------------------------------------------------------------------
355*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException)
356*cdf0e10cSrcweir {
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setRef", NULL);
361*cdf0e10cSrcweir }
362*cdf0e10cSrcweir // -------------------------------------------------------------------------
363*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException)
364*cdf0e10cSrcweir {
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir 
367*cdf0e10cSrcweir 
368*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setBlob", NULL);
369*cdf0e10cSrcweir }
370*cdf0e10cSrcweir // -------------------------------------------------------------------------
371*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException)
372*cdf0e10cSrcweir {
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setClob", NULL);
377*cdf0e10cSrcweir }
378*cdf0e10cSrcweir // -------------------------------------------------------------------------
379*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException)
380*cdf0e10cSrcweir {
381*cdf0e10cSrcweir 
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("setArray", NULL);
385*cdf0e10cSrcweir }
386*cdf0e10cSrcweir // -------------------------------------------------------------------------
387*cdf0e10cSrcweir void SAL_CALL MacabPreparedStatement::clearParameters() throw(SQLException, RuntimeException)
388*cdf0e10cSrcweir {
389*cdf0e10cSrcweir ::dbtools::throwFunctionNotSupportedException("clearParameters", NULL);
390*cdf0e10cSrcweir }
391*cdf0e10cSrcweir // -------------------------------------------------------------------------
392*cdf0e10cSrcweir void MacabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
393*cdf0e10cSrcweir {
394*cdf0e10cSrcweir 	switch (nHandle)
395*cdf0e10cSrcweir 	{
396*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETCONCURRENCY:
397*cdf0e10cSrcweir 			break;
398*cdf0e10cSrcweir 		case PROPERTY_ID_RESULTSETTYPE:
399*cdf0e10cSrcweir 			break;
400*cdf0e10cSrcweir 		case PROPERTY_ID_FETCHDIRECTION:
401*cdf0e10cSrcweir 			break;
402*cdf0e10cSrcweir 		case PROPERTY_ID_USEBOOKMARKS:
403*cdf0e10cSrcweir 			break;
404*cdf0e10cSrcweir 		default:
405*cdf0e10cSrcweir 			MacabCommonStatement::setFastPropertyValue_NoBroadcast(nHandle,rValue);
406*cdf0e10cSrcweir 	}
407*cdf0e10cSrcweir }
408