1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <com/sun/star/sdbc/SQLException.hpp>
27 namespace sal::systools
{ class BStr
; };
29 namespace connectivity::ado
36 // Also here: Free BSTR with SysFreeString()!
37 static sal::systools::BStr
& GetKeyStr();
39 static const CLSID CLSID_ADOCATALOG_25
;
40 static const IID IID_ADOCATALOG_25
;
42 static const CLSID CLSID_ADOCONNECTION_21
;
43 static const IID IID_ADOCONNECTION_21
;
45 static const CLSID CLSID_ADOCOMMAND_21
;
46 static const IID IID_ADOCOMMAND_21
;
48 static const CLSID CLSID_ADORECORDSET_21
;
49 static const IID IID_ADORECORDSET_21
;
51 static const CLSID CLSID_ADOINDEX_25
;
52 static const IID IID_ADOINDEX_25
;
54 static const CLSID CLSID_ADOCOLUMN_25
;
55 static const IID IID_ADOCOLUMN_25
;
57 static const CLSID CLSID_ADOKEY_25
;
58 static const IID IID_ADOKEY_25
;
60 static const CLSID CLSID_ADOTABLE_25
;
61 static const IID IID_ADOTABLE_25
;
63 static const CLSID CLSID_ADOGROUP_25
;
64 static const IID IID_ADOGROUP_25
;
66 static const CLSID CLSID_ADOUSER_25
;
67 static const IID IID_ADOUSER_25
;
69 static const CLSID CLSID_ADOVIEW_25
;
70 static const IID IID_ADOVIEW_25
;
72 /// @throws css::sdbc::SQLException
73 /// @throws css::uno::RuntimeException
74 static void ThrowException(ADOConnection
* _pAdoCon
,const css::uno::Reference
< css::uno::XInterface
>& _xInterface
);
75 static sal_Int32
MapADOType2Jdbc(DataTypeEnum eType
);
76 static DataTypeEnum
MapJdbc2ADOType(sal_Int32 _nType
,sal_Int32 _nJetEngine
);
77 static bool isJetEngine(sal_Int32 _nEngineType
);
79 static ObjectTypeEnum
mapObjectType2Ado(sal_Int32 objType
);
80 static sal_Int32
mapAdoType2Object(ObjectTypeEnum objType
);
81 static sal_Int32
mapAdoRights2Sdbc(RightsEnum eRights
);
82 static sal_Int32
mapRights2Ado(sal_Int32 nRights
);
84 /// @throws css::sdbc::SQLException
85 /// @throws css::uno::RuntimeException
86 static WpADOField
getField(ADORecordset
* _pRecordSet
,sal_Int32 _nColumnIndex
);
93 #define ADO_PROP(ItemName) \
94 WpADOProperty aProp(aProps.GetItem(ItemName)); \
97 aVar = aProp.GetValue(); \
99 ADOS::ThrowException(m_rADOConnection,*this);
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */