1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_connectivity.hxx"
26 #include "adabas/BPreparedStatement.hxx"
27 #include "adabas/BResultSet.hxx"
28 #include <com/sun/star/lang/DisposedException.hpp>
29 #include <connectivity/dbexception.hxx>
30
31 using namespace connectivity;
32 using namespace connectivity::adabas;
33 using namespace connectivity::odbc;
34 //------------------------------------------------------------------------------
35 using namespace com::sun::star::uno;
36 using namespace com::sun::star::lang;
37 using namespace com::sun::star::beans;
38 using namespace com::sun::star::sdbc;
39 using namespace com::sun::star::sdbcx;
40 using namespace com::sun::star::container;
41 using namespace com::sun::star::io;
42 using namespace com::sun::star::util;
43
OAdabasPreparedStatement(OAdabasConnection * _pConnection,const::rtl::OUString & sql)44 OAdabasPreparedStatement::OAdabasPreparedStatement( OAdabasConnection* _pConnection,const ::rtl::OUString& sql)
45 : ::connectivity::odbc::OPreparedStatement( _pConnection,sql)
46 {
47 m_aSelectColumns = _pConnection->createSelectColumns(sql);
48 }
49 // -----------------------------------------------------------------------------
createResulSet()50 OResultSet* OAdabasPreparedStatement::createResulSet()
51 {
52 return new OAdabasResultSet(m_aStatementHandle,this,m_aSelectColumns);
53 }
54 // -----------------------------------------------------------------------------
setUsingBookmarks(sal_Bool)55 void OAdabasPreparedStatement::setUsingBookmarks(sal_Bool /*_bUseBookmark*/)
56 {
57 ::dbtools::throwFeatureNotImplementedException( "bookmarks", *this );
58 // adabas doesn't support bookmarks
59 }
60 // -----------------------------------------------------------------------------
setResultSetConcurrency(sal_Int32)61 void OAdabasPreparedStatement::setResultSetConcurrency(sal_Int32 /*_par0*/)
62 {
63 ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetConcurrency", *this );
64 }
65 // -----------------------------------------------------------------------------
setResultSetType(sal_Int32)66 void OAdabasPreparedStatement::setResultSetType(sal_Int32 /*_par0*/)
67 {
68 ::dbtools::throwFeatureNotImplementedException( "PreparedStatement:ResultSetType", *this );
69 }
70 // -----------------------------------------------------------------------------
71
72
73