1*caf5cd79SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*caf5cd79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*caf5cd79SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*caf5cd79SAndrew Rist * distributed with this work for additional information 6*caf5cd79SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*caf5cd79SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*caf5cd79SAndrew Rist * "License"); you may not use this file except in compliance 9*caf5cd79SAndrew Rist * with the License. You may obtain a copy of the License at 10*caf5cd79SAndrew Rist * 11*caf5cd79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*caf5cd79SAndrew Rist * 13*caf5cd79SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*caf5cd79SAndrew Rist * software distributed under the License is distributed on an 15*caf5cd79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*caf5cd79SAndrew Rist * KIND, either express or implied. See the License for the 17*caf5cd79SAndrew Rist * specific language governing permissions and limitations 18*caf5cd79SAndrew Rist * under the License. 19*caf5cd79SAndrew Rist * 20*caf5cd79SAndrew Rist *************************************************************/ 21*caf5cd79SAndrew Rist 22*caf5cd79SAndrew Rist 23cdf0e10cSrcweir #ifndef _CONNECTIVITY_ADO_AWRAPADO_HXX_ 24cdf0e10cSrcweir #define _CONNECTIVITY_ADO_AWRAPADO_HXX_ 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 27cdf0e10cSrcweir 28cdf0e10cSrcweir // Includes fuer ADO 29cdf0e10cSrcweir #include "ado_pre_sys_include.h" 30cdf0e10cSrcweir #include <oledb.h> 31cdf0e10cSrcweir #include <ocidl.h> 32cdf0e10cSrcweir #include <adoint.h> 33cdf0e10cSrcweir #include "ado_post_sys_include.h" 34cdf0e10cSrcweir 35cdf0e10cSrcweir 36cdf0e10cSrcweir #include "ado/adoimp.hxx" 37cdf0e10cSrcweir #include "ado/Aolewrap.hxx" 38cdf0e10cSrcweir #include "ado/Aolevariant.hxx" 39cdf0e10cSrcweir 40cdf0e10cSrcweir namespace connectivity 41cdf0e10cSrcweir { 42cdf0e10cSrcweir namespace ado 43cdf0e10cSrcweir { 44cdf0e10cSrcweir class WpADOConnection; 45cdf0e10cSrcweir class WpADOCommand; 46cdf0e10cSrcweir class WpADORecordset; 47cdf0e10cSrcweir class WpADOField; 48cdf0e10cSrcweir class WpADOParameter; 49cdf0e10cSrcweir class WpADOError; 50cdf0e10cSrcweir class WpADOProperty; 51cdf0e10cSrcweir 52cdf0e10cSrcweir typedef WpOLEAppendCollection< ADOFields, ADOField, WpADOField> WpADOFields; 53cdf0e10cSrcweir typedef WpOLECollection< ADOProperties, ADOProperty, WpADOProperty> WpADOProperties; 54cdf0e10cSrcweir 55cdf0e10cSrcweir //------------------------------------------------------------------------ 56cdf0e10cSrcweir class WpADOConnection : public WpOLEBase<ADOConnection> 57cdf0e10cSrcweir { 58cdf0e10cSrcweir friend class WpADOCommand; 59cdf0e10cSrcweir public: 60cdf0e10cSrcweir WpADOConnection(ADOConnection * pInt)61cdf0e10cSrcweir WpADOConnection(ADOConnection* pInt) : WpOLEBase<ADOConnection>(pInt){} 62cdf0e10cSrcweir WpADOConnection(const WpADOConnection & rhs)63cdf0e10cSrcweir WpADOConnection(const WpADOConnection& rhs){operator=(rhs);} 64cdf0e10cSrcweir operator =(const WpADOConnection & rhs)65cdf0e10cSrcweir WpADOConnection& operator=(const WpADOConnection& rhs) 66cdf0e10cSrcweir {WpOLEBase<ADOConnection>::operator=(rhs); return *this;} 67cdf0e10cSrcweir 68cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 69cdf0e10cSrcweir 70cdf0e10cSrcweir WpADOProperties get_Properties() const; 71cdf0e10cSrcweir 72cdf0e10cSrcweir rtl::OUString GetConnectionString() const; 73cdf0e10cSrcweir 74cdf0e10cSrcweir sal_Bool PutConnectionString(const ::rtl::OUString &aCon) const; 75cdf0e10cSrcweir 76cdf0e10cSrcweir sal_Int32 GetCommandTimeout() const; 77cdf0e10cSrcweir 78cdf0e10cSrcweir void PutCommandTimeout(sal_Int32 nRet); 79cdf0e10cSrcweir 80cdf0e10cSrcweir sal_Int32 GetConnectionTimeout() const ; 81cdf0e10cSrcweir 82cdf0e10cSrcweir void PutConnectionTimeout(sal_Int32 nRet); 83cdf0e10cSrcweir 84cdf0e10cSrcweir sal_Bool Close( ) ; 85cdf0e10cSrcweir 86cdf0e10cSrcweir sal_Bool Execute(const ::rtl::OUString& _CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset); 87cdf0e10cSrcweir 88cdf0e10cSrcweir sal_Bool BeginTrans(); 89cdf0e10cSrcweir 90cdf0e10cSrcweir sal_Bool CommitTrans( ) ; 91cdf0e10cSrcweir 92cdf0e10cSrcweir sal_Bool RollbackTrans( ); 93cdf0e10cSrcweir 94cdf0e10cSrcweir sal_Bool Open(const ::rtl::OUString& ConnectionString, const ::rtl::OUString& UserID,const ::rtl::OUString& Password,long Options); 95cdf0e10cSrcweir 96cdf0e10cSrcweir sal_Bool GetErrors(ADOErrors** pErrors); 97cdf0e10cSrcweir 98cdf0e10cSrcweir ::rtl::OUString GetDefaultDatabase() const; 99cdf0e10cSrcweir 100cdf0e10cSrcweir sal_Bool PutDefaultDatabase(const ::rtl::OUString& _bstr); 101cdf0e10cSrcweir 102cdf0e10cSrcweir IsolationLevelEnum get_IsolationLevel() const ; 103cdf0e10cSrcweir 104cdf0e10cSrcweir sal_Bool put_IsolationLevel(const IsolationLevelEnum& eNum) ; 105cdf0e10cSrcweir 106cdf0e10cSrcweir sal_Int32 get_Attributes() const; 107cdf0e10cSrcweir 108cdf0e10cSrcweir sal_Bool put_Attributes(sal_Int32 nRet); 109cdf0e10cSrcweir 110cdf0e10cSrcweir CursorLocationEnum get_CursorLocation() const; 111cdf0e10cSrcweir 112cdf0e10cSrcweir sal_Bool put_CursorLocation(const CursorLocationEnum &eNum) ; 113cdf0e10cSrcweir 114cdf0e10cSrcweir ConnectModeEnum get_Mode() const; 115cdf0e10cSrcweir 116cdf0e10cSrcweir sal_Bool put_Mode(const ConnectModeEnum &eNum) ; 117cdf0e10cSrcweir 118cdf0e10cSrcweir ::rtl::OUString get_Provider() const; 119cdf0e10cSrcweir 120cdf0e10cSrcweir sal_Bool put_Provider(const ::rtl::OUString& _bstr); 121cdf0e10cSrcweir 122cdf0e10cSrcweir sal_Int32 get_State() const; 123cdf0e10cSrcweir 124cdf0e10cSrcweir sal_Bool OpenSchema(SchemaEnum eNum,OLEVariant& Restrictions,OLEVariant& SchemaID,ADORecordset**pprset); 125cdf0e10cSrcweir 126cdf0e10cSrcweir ::rtl::OUString get_Version() const; 127cdf0e10cSrcweir 128cdf0e10cSrcweir // special methods 129cdf0e10cSrcweir ADORecordset* getExportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ); 130cdf0e10cSrcweir ADORecordset* getImportedKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ); 131cdf0e10cSrcweir ADORecordset* getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ); 132cdf0e10cSrcweir ADORecordset* getIndexInfo( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Bool unique, sal_Bool approximate ); 133cdf0e10cSrcweir ADORecordset* getTablePrivileges( const ::com::sun::star::uno::Any& catalog, 134cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 135cdf0e10cSrcweir const ::rtl::OUString& tableNamePattern ); 136cdf0e10cSrcweir ADORecordset* getCrossReference( const ::com::sun::star::uno::Any& primaryCatalog, 137cdf0e10cSrcweir const ::rtl::OUString& primarySchema, 138cdf0e10cSrcweir const ::rtl::OUString& primaryTable, 139cdf0e10cSrcweir const ::com::sun::star::uno::Any& foreignCatalog, 140cdf0e10cSrcweir const ::rtl::OUString& foreignSchema, 141cdf0e10cSrcweir const ::rtl::OUString& foreignTable); 142cdf0e10cSrcweir ADORecordset* getProcedures( const ::com::sun::star::uno::Any& catalog, 143cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 144cdf0e10cSrcweir const ::rtl::OUString& procedureNamePattern ); 145cdf0e10cSrcweir ADORecordset* getProcedureColumns( const ::com::sun::star::uno::Any& catalog, 146cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 147cdf0e10cSrcweir const ::rtl::OUString& procedureNamePattern, 148cdf0e10cSrcweir const ::rtl::OUString& columnNamePattern ); 149cdf0e10cSrcweir ADORecordset* getTables( const ::com::sun::star::uno::Any& catalog, 150cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 151cdf0e10cSrcweir const ::rtl::OUString& tableNamePattern, 152cdf0e10cSrcweir const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types ); 153cdf0e10cSrcweir ADORecordset* getColumns( const ::com::sun::star::uno::Any& catalog, 154cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 155cdf0e10cSrcweir const ::rtl::OUString& tableNamePattern, 156cdf0e10cSrcweir const ::rtl::OUString& columnNamePattern ); 157cdf0e10cSrcweir ADORecordset* getColumnPrivileges( const ::com::sun::star::uno::Any& catalog, 158cdf0e10cSrcweir const ::rtl::OUString& schemaPattern, 159cdf0e10cSrcweir const ::rtl::OUString& table, 160cdf0e10cSrcweir const ::rtl::OUString& columnNamePattern ); 161cdf0e10cSrcweir ADORecordset* getTypeInfo(DataTypeEnum _eType = adEmpty ); 162cdf0e10cSrcweir }; 163cdf0e10cSrcweir 164cdf0e10cSrcweir //------------------------------------------------------------------------ 165cdf0e10cSrcweir class WpADOCommand : public WpOLEBase<ADOCommand> 166cdf0e10cSrcweir { 167cdf0e10cSrcweir public: WpADOCommand()168cdf0e10cSrcweir WpADOCommand(){} 169cdf0e10cSrcweir // Konstruktoren, operator= 170cdf0e10cSrcweir // diese rufen nur die Oberklasse WpADOCommand(ADOCommand * pInt)171cdf0e10cSrcweir WpADOCommand(ADOCommand* pInt) : WpOLEBase<ADOCommand>(pInt){} 172cdf0e10cSrcweir WpADOCommand(const WpADOCommand & rhs)173cdf0e10cSrcweir WpADOCommand(const WpADOCommand& rhs){operator=(rhs);} 174cdf0e10cSrcweir operator =(const WpADOCommand & rhs)175cdf0e10cSrcweir WpADOCommand& operator=(const WpADOCommand& rhs) 176cdf0e10cSrcweir { 177cdf0e10cSrcweir WpOLEBase<ADOCommand>::operator=(rhs); return *this;} 178cdf0e10cSrcweir 179cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 180cdf0e10cSrcweir 181cdf0e10cSrcweir sal_Bool putref_ActiveConnection( WpADOConnection *pCon); 182cdf0e10cSrcweir 183cdf0e10cSrcweir void put_ActiveConnection(/* [in] */ const OLEVariant& vConn); 184cdf0e10cSrcweir void Create(); 185cdf0e10cSrcweir sal_Int32 get_State() const; 186cdf0e10cSrcweir ::rtl::OUString get_CommandText() const; 187cdf0e10cSrcweir sal_Bool put_CommandText(const ::rtl::OUString &aCon) ; 188cdf0e10cSrcweir sal_Int32 get_CommandTimeout() const; 189cdf0e10cSrcweir void put_CommandTimeout(sal_Int32 nRet); 190cdf0e10cSrcweir sal_Bool get_Prepared() const; 191cdf0e10cSrcweir sal_Bool put_Prepared(VARIANT_BOOL bPrepared) const; 192cdf0e10cSrcweir sal_Bool Execute(OLEVariant& RecordsAffected,OLEVariant& Parameters,long Options, ADORecordset** ppiRset); 193cdf0e10cSrcweir ADOParameter* CreateParameter(const ::rtl::OUString &_bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value); 194cdf0e10cSrcweir 195cdf0e10cSrcweir ADOParameters* get_Parameters() const; 196cdf0e10cSrcweir sal_Bool put_CommandType( /* [in] */ CommandTypeEnum lCmdType); 197cdf0e10cSrcweir CommandTypeEnum get_CommandType( ) const ; 198cdf0e10cSrcweir // gibt den Namen des Feldes zur"ueck 199cdf0e10cSrcweir ::rtl::OUString GetName() const ; 200cdf0e10cSrcweir sal_Bool put_Name(const ::rtl::OUString& _Name); 201cdf0e10cSrcweir sal_Bool Cancel(); 202cdf0e10cSrcweir }; 203cdf0e10cSrcweir //------------------------------------------------------------------------ 204cdf0e10cSrcweir class WpADOError : public WpOLEBase<ADOError> 205cdf0e10cSrcweir { 206cdf0e10cSrcweir public: 207cdf0e10cSrcweir 208cdf0e10cSrcweir // Konstruktoren, operator= 209cdf0e10cSrcweir // diese rufen nur die Oberklasse 210cdf0e10cSrcweir WpADOError(ADOError * pInt)211cdf0e10cSrcweir WpADOError(ADOError* pInt):WpOLEBase<ADOError>(pInt){} 212cdf0e10cSrcweir WpADOError(const WpADOError & rhs)213cdf0e10cSrcweir WpADOError(const WpADOError& rhs){operator=(rhs);} 214cdf0e10cSrcweir operator =(const WpADOError & rhs)215cdf0e10cSrcweir WpADOError& operator=(const WpADOError& rhs) 216cdf0e10cSrcweir {WpOLEBase<ADOError>::operator=(rhs); return *this;} 217cdf0e10cSrcweir 218cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 219cdf0e10cSrcweir 220cdf0e10cSrcweir ::rtl::OUString GetDescription() const; 221cdf0e10cSrcweir 222cdf0e10cSrcweir ::rtl::OUString GetSource() const ; 223cdf0e10cSrcweir 224cdf0e10cSrcweir sal_Int32 GetNumber() const ; 225cdf0e10cSrcweir ::rtl::OUString GetSQLState() const ; 226cdf0e10cSrcweir sal_Int32 GetNativeError() const ; 227cdf0e10cSrcweir }; 228cdf0e10cSrcweir 229cdf0e10cSrcweir 230cdf0e10cSrcweir 231cdf0e10cSrcweir //------------------------------------------------------------------------ 232cdf0e10cSrcweir class WpADOField : public WpOLEBase<ADOField> 233cdf0e10cSrcweir { 234cdf0e10cSrcweir // friend class WpADOFields; 235cdf0e10cSrcweir public: 236cdf0e10cSrcweir 237cdf0e10cSrcweir // Konstruktoren, operator= 238cdf0e10cSrcweir // diese rufen nur die Oberklasse WpADOField(ADOField * pInt=NULL)239cdf0e10cSrcweir WpADOField(ADOField* pInt=NULL):WpOLEBase<ADOField>(pInt){} WpADOField(const WpADOField & rhs)240cdf0e10cSrcweir WpADOField(const WpADOField& rhs){operator=(rhs);} 241cdf0e10cSrcweir operator =(const WpADOField & rhs)242cdf0e10cSrcweir WpADOField& operator=(const WpADOField& rhs) 243cdf0e10cSrcweir {WpOLEBase<ADOField>::operator=(rhs); return *this;} 244cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 245cdf0e10cSrcweir 246cdf0e10cSrcweir WpADOProperties get_Properties(); 247cdf0e10cSrcweir sal_Int32 GetActualSize() const ; 248cdf0e10cSrcweir sal_Int32 GetAttributes() const ; 249cdf0e10cSrcweir sal_Int32 GetStatus() const ; 250cdf0e10cSrcweir sal_Int32 GetDefinedSize() const ; 251cdf0e10cSrcweir // gibt den Namen des Feldes zur"ueck 252cdf0e10cSrcweir ::rtl::OUString GetName() const ; 253cdf0e10cSrcweir DataTypeEnum GetADOType() const ; 254cdf0e10cSrcweir void get_Value(OLEVariant& aValVar) const ; 255cdf0e10cSrcweir OLEVariant get_Value() const; 256cdf0e10cSrcweir sal_Bool PutValue(const OLEVariant& aVariant); 257cdf0e10cSrcweir sal_Int32 GetPrecision() const ; 258cdf0e10cSrcweir sal_Int32 GetNumericScale() const ; 259cdf0e10cSrcweir sal_Bool AppendChunk(const OLEVariant& _Variant); 260cdf0e10cSrcweir OLEVariant GetChunk(long Length) const; 261cdf0e10cSrcweir void GetChunk(long Length,OLEVariant &aValVar) const; 262cdf0e10cSrcweir OLEVariant GetOriginalValue() const; 263cdf0e10cSrcweir void GetOriginalValue(OLEVariant &aValVar) const; 264cdf0e10cSrcweir OLEVariant GetUnderlyingValue() const; 265cdf0e10cSrcweir 266cdf0e10cSrcweir void GetUnderlyingValue(OLEVariant &aValVar) const; 267cdf0e10cSrcweir 268cdf0e10cSrcweir sal_Bool PutPrecision(sal_Int8 _prec); 269cdf0e10cSrcweir 270cdf0e10cSrcweir sal_Bool PutNumericScale(sal_Int8 _prec); 271cdf0e10cSrcweir 272cdf0e10cSrcweir void PutADOType(DataTypeEnum eType) ; 273cdf0e10cSrcweir 274cdf0e10cSrcweir sal_Bool PutDefinedSize(sal_Int32 _nDefSize); 275cdf0e10cSrcweir 276cdf0e10cSrcweir sal_Bool PutAttributes(sal_Int32 _nDefSize); 277cdf0e10cSrcweir }; 278cdf0e10cSrcweir 279cdf0e10cSrcweir 280cdf0e10cSrcweir 281cdf0e10cSrcweir //------------------------------------------------------------------------ 282cdf0e10cSrcweir class WpADOProperty: public WpOLEBase<ADOProperty> 283cdf0e10cSrcweir { 284cdf0e10cSrcweir public: 285cdf0e10cSrcweir // Konstruktoren, operator= 286cdf0e10cSrcweir // diese rufen nur die Oberklasse WpADOProperty(ADOProperty * pInt=NULL)287cdf0e10cSrcweir WpADOProperty(ADOProperty* pInt=NULL):WpOLEBase<ADOProperty>(pInt){} WpADOProperty(const WpADOProperty & rhs)288cdf0e10cSrcweir WpADOProperty(const WpADOProperty& rhs){operator=(rhs);} operator =(const WpADOProperty & rhs)289cdf0e10cSrcweir WpADOProperty& operator=(const WpADOProperty& rhs) 290cdf0e10cSrcweir {WpOLEBase<ADOProperty>::operator=(rhs); return *this;} 291cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 292cdf0e10cSrcweir 293cdf0e10cSrcweir OLEVariant GetValue() const; 294cdf0e10cSrcweir void GetValue(OLEVariant &aValVar) const; 295cdf0e10cSrcweir sal_Bool PutValue(const OLEVariant &aValVar) ; 296cdf0e10cSrcweir ::rtl::OUString GetName() const ; 297cdf0e10cSrcweir DataTypeEnum GetADOType() const ; 298cdf0e10cSrcweir sal_Int32 GetAttributes() const ; 299cdf0e10cSrcweir sal_Bool PutAttributes(sal_Int32 _nDefSize); 300cdf0e10cSrcweir }; 301cdf0e10cSrcweir 302cdf0e10cSrcweir 303cdf0e10cSrcweir class WpADORecordset : public WpOLEBase<ADORecordset> 304cdf0e10cSrcweir { 305cdf0e10cSrcweir 306cdf0e10cSrcweir public: 307cdf0e10cSrcweir // Konstruktoren, operator= 308cdf0e10cSrcweir // diese rufen nur die Oberklasse WpADORecordset(ADORecordset * pInt=NULL)309cdf0e10cSrcweir WpADORecordset(ADORecordset* pInt=NULL):WpOLEBase<ADORecordset>(pInt){} WpADORecordset(const WpADORecordset & rhs)310cdf0e10cSrcweir WpADORecordset(const WpADORecordset& rhs){operator=(rhs);} operator =(const WpADORecordset & rhs)311cdf0e10cSrcweir WpADORecordset& operator=(const WpADORecordset& rhs) 312cdf0e10cSrcweir { 313cdf0e10cSrcweir WpOLEBase<ADORecordset>::operator=(rhs); 314cdf0e10cSrcweir return *this; 315cdf0e10cSrcweir } ~WpADORecordset()316cdf0e10cSrcweir ~WpADORecordset() 317cdf0e10cSrcweir { 318cdf0e10cSrcweir // if(pInterface && get_State() == adStateOpen) 319cdf0e10cSrcweir // Close(); 320cdf0e10cSrcweir } 321cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 322cdf0e10cSrcweir void Create(); 323cdf0e10cSrcweir sal_Bool Open( 324cdf0e10cSrcweir /* [optional][in] */ VARIANT Source, 325cdf0e10cSrcweir /* [optional][in] */ VARIANT ActiveConnection, 326cdf0e10cSrcweir /* [defaultvalue][in] */ CursorTypeEnum CursorType, 327cdf0e10cSrcweir /* [defaultvalue][in] */ LockTypeEnum LockType, 328cdf0e10cSrcweir /* [defaultvalue][in] */ sal_Int32 Options); 329cdf0e10cSrcweir LockTypeEnum GetLockType(); 330cdf0e10cSrcweir void Close(); 331cdf0e10cSrcweir sal_Bool Cancel() const; 332cdf0e10cSrcweir sal_Int32 get_State( ); 333cdf0e10cSrcweir sal_Bool Supports( /* [in] */ CursorOptionEnum CursorOptions); 334cdf0e10cSrcweir PositionEnum get_AbsolutePosition(); 335cdf0e10cSrcweir void GetDataSource(IUnknown** pIUnknown) const ; 336cdf0e10cSrcweir void PutRefDataSource(IUnknown* pIUnknown); 337cdf0e10cSrcweir void GetBookmark(VARIANT& var); 338cdf0e10cSrcweir OLEVariant GetBookmark(); 339cdf0e10cSrcweir CompareEnum CompareBookmarks(const OLEVariant& left,const OLEVariant& right); 340cdf0e10cSrcweir sal_Bool SetBookmark(const OLEVariant &pSafeAr); 341cdf0e10cSrcweir WpADOFields GetFields() const; 342cdf0e10cSrcweir sal_Bool Move(sal_Int32 nRows, VARIANT aBmk); 343cdf0e10cSrcweir sal_Bool MoveNext(); 344cdf0e10cSrcweir sal_Bool MovePrevious(); 345cdf0e10cSrcweir sal_Bool MoveFirst(); 346cdf0e10cSrcweir sal_Bool MoveLast(); 347cdf0e10cSrcweir 348cdf0e10cSrcweir sal_Bool IsAtBOF() const; 349cdf0e10cSrcweir sal_Bool IsAtEOF() const; 350cdf0e10cSrcweir sal_Bool Delete(AffectEnum eNum); 351cdf0e10cSrcweir sal_Bool AddNew(const OLEVariant &FieldList,const OLEVariant &Values); 352cdf0e10cSrcweir sal_Bool Update(const OLEVariant &FieldList,const OLEVariant &Values); 353cdf0e10cSrcweir sal_Bool CancelUpdate(); 354cdf0e10cSrcweir WpADOProperties get_Properties() const; 355cdf0e10cSrcweir sal_Bool NextRecordset(OLEVariant& RecordsAffected,ADORecordset** ppiRset); 356cdf0e10cSrcweir sal_Bool get_RecordCount(sal_Int32 &_nRet) const; 357cdf0e10cSrcweir sal_Bool get_MaxRecords(sal_Int32 &_nRet) const; 358cdf0e10cSrcweir sal_Bool put_MaxRecords(sal_Int32 _nRet); 359cdf0e10cSrcweir sal_Bool get_CursorType(CursorTypeEnum &_nRet) const; 360cdf0e10cSrcweir sal_Bool put_CursorType(CursorTypeEnum _nRet); 361cdf0e10cSrcweir sal_Bool get_LockType(LockTypeEnum &_nRet) const; 362cdf0e10cSrcweir sal_Bool put_LockType(LockTypeEnum _nRet); 363cdf0e10cSrcweir sal_Bool get_CacheSize(sal_Int32 &_nRet) const; 364cdf0e10cSrcweir sal_Bool put_CacheSize(sal_Int32 _nRet); 365cdf0e10cSrcweir sal_Bool UpdateBatch(AffectEnum AffectRecords); 366cdf0e10cSrcweir }; 367cdf0e10cSrcweir 368cdf0e10cSrcweir //------------------------------------------------------------------------ 369cdf0e10cSrcweir class WpADOParameter:public WpOLEBase<ADOParameter> 370cdf0e10cSrcweir { 371cdf0e10cSrcweir public: 372cdf0e10cSrcweir // Konstruktoren, operator= 373cdf0e10cSrcweir // diese rufen nur die Oberklasse WpADOParameter(ADOParameter * pInt)374cdf0e10cSrcweir WpADOParameter(ADOParameter* pInt):WpOLEBase<ADOParameter>(pInt){} WpADOParameter(const WpADOParameter & rhs)375cdf0e10cSrcweir WpADOParameter(const WpADOParameter& rhs):WpOLEBase<ADOParameter>(rhs){} operator =(const WpADOParameter & rhs)376cdf0e10cSrcweir WpADOParameter& operator=(const WpADOParameter& rhs) 377cdf0e10cSrcweir {WpOLEBase<ADOParameter>::operator=(rhs); return *this;} 378cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 379cdf0e10cSrcweir 380cdf0e10cSrcweir ::rtl::OUString GetName() const ; 381cdf0e10cSrcweir DataTypeEnum GetADOType() const ; 382cdf0e10cSrcweir void put_Type(const DataTypeEnum& _eType); 383cdf0e10cSrcweir sal_Bool put_Size(const sal_Int32& _nSize); 384cdf0e10cSrcweir sal_Int32 GetAttributes() const ; 385cdf0e10cSrcweir sal_Int32 GetPrecision() const ; 386cdf0e10cSrcweir sal_Int32 GetNumericScale() const ; 387cdf0e10cSrcweir ParameterDirectionEnum get_Direction() const; 388cdf0e10cSrcweir void GetValue(OLEVariant& aValVar) const ; 389cdf0e10cSrcweir OLEVariant GetValue() const; 390cdf0e10cSrcweir sal_Bool PutValue(const OLEVariant& aVariant); 391cdf0e10cSrcweir sal_Bool AppendChunk(const OLEVariant& aVariant); 392cdf0e10cSrcweir }; 393cdf0e10cSrcweir 394cdf0e10cSrcweir class OTools 395cdf0e10cSrcweir { 396cdf0e10cSrcweir public: 397cdf0e10cSrcweir /** putValue set the property value at the ado column 398cdf0e10cSrcweir @param _rProps the properties where to set 399cdf0e10cSrcweir @param _aPosition which property to set 400cdf0e10cSrcweir @param _aValVar the value to set 401cdf0e10cSrcweir */ 402cdf0e10cSrcweir static void putValue(const WpADOProperties& _rProps,const OLEVariant &_aPosition,const OLEVariant &_aValVar); 403cdf0e10cSrcweir 404cdf0e10cSrcweir /** getValue returns a specific property value 405cdf0e10cSrcweir @param _rProps the properties where to set 406cdf0e10cSrcweir @param _aPosition the property 407cdf0e10cSrcweir 408cdf0e10cSrcweir @return the property value 409cdf0e10cSrcweir */ 410cdf0e10cSrcweir static OLEVariant getValue(const WpADOProperties& _rProps,const OLEVariant &_aPosition); 411cdf0e10cSrcweir }; 412cdf0e10cSrcweir } 413cdf0e10cSrcweir } 414cdf0e10cSrcweir #endif //_CONNECTIVITY_ADO_AWRAPADO_HXX_ 415cdf0e10cSrcweir 416