LibreOffice Module connectivity (master) 1
Awrapado.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <sal/macros.h>
21#include <ado/Awrapado.hxx>
22#include <ado/Awrapadox.hxx>
23#include <comphelper/types.hxx>
24#include <o3tl/string_view.hxx>
25#include <rtl/ustrbuf.hxx>
26#include <sal/log.hxx>
27#include <systools/win32/oleauto.hxx>
28
29using namespace connectivity::ado;
30
31void WpADOCatalog::Create()
32{
33 pInterface.CoCreateInstance(ADOS::CLSID_ADOCATALOG_25, nullptr, CLSCTX_INPROC_SERVER);
34}
35
36
38{
39 WpADOProperties pProps;
40 pInterface->get_Properties(&pProps);
41 return pProps;
42}
43
45{
46 assert(pInterface);
47 sal::systools::BStr aBSTR;
48 pInterface->get_ConnectionString(&aBSTR);
49 return OUString(aBSTR);
50}
51
52bool WpADOConnection::PutConnectionString(std::u16string_view aCon) const
53{
54 assert(pInterface);
55 sal::systools::BStr bstr(aCon);
56 bool bErg = SUCCEEDED(pInterface->put_ConnectionString(bstr));
57
58 return bErg;
59}
60
62{
63 assert(pInterface);
64 sal_Int32 nRet=0;
65 pInterface->get_CommandTimeout(&nRet);
66 return nRet;
67}
68
70{
71 assert(pInterface);
72 pInterface->put_CommandTimeout(nRet);
73}
74
76{
77 assert(pInterface);
78 sal_Int32 nRet=0;
79 pInterface->get_ConnectionTimeout(&nRet);
80 return nRet;
81}
82
84{
85 assert(pInterface);
86 pInterface->put_ConnectionTimeout(nRet);
87}
88
90{
91 assert(pInterface);
92 return (SUCCEEDED(pInterface->Close()));
93}
94
95bool WpADOConnection::Execute(std::u16string_view CommandText,OLEVariant& RecordsAffected,long Options, WpADORecordset** ppiRset)
96{
97 assert(pInterface);
98 sal::systools::BStr sStr1(CommandText);
99 bool bErg = SUCCEEDED(pInterface->Execute(sStr1,&RecordsAffected,Options,reinterpret_cast<ADORecordset**>(ppiRset)));
100 return bErg;
101}
102
104{
105 assert(pInterface);
106 sal_Int32 nIso=0;
107 return SUCCEEDED(pInterface->BeginTrans(&nIso));
108}
109
111{
112 assert(pInterface);
113 return SUCCEEDED(pInterface->CommitTrans());
114}
115
117{
118 assert(pInterface);
119 return SUCCEEDED(pInterface->RollbackTrans());
120}
121
122bool WpADOConnection::Open(std::u16string_view ConnectionString, std::u16string_view UserID,std::u16string_view Password,long Options)
123{
124 assert(pInterface);
125 sal::systools::BStr sStr1(ConnectionString);
126 sal::systools::BStr sStr2(UserID);
127 sal::systools::BStr sStr3(Password);
128 bool bErg = SUCCEEDED(pInterface->Open(sStr1, sStr2, sStr3, Options));
129 return bErg;
130}
131
132bool WpADOConnection::GetErrors(ADOErrors** pErrors)
133{
134 assert(pInterface);
135 return SUCCEEDED(pInterface->get_Errors(pErrors));
136}
137
139{
140 assert(pInterface);
141 sal::systools::BStr aBSTR; pInterface->get_DefaultDatabase(&aBSTR);
142 return OUString(aBSTR);
143}
144
145bool WpADOConnection::PutDefaultDatabase(std::u16string_view _bstr)
146{
147 assert(pInterface);
148 sal::systools::BStr bstr(_bstr);
149 bool bErg = SUCCEEDED(pInterface->put_DefaultDatabase(bstr));
150
151 return bErg;
152}
153
154IsolationLevelEnum WpADOConnection::get_IsolationLevel() const
155{
156 assert(pInterface);
157 IsolationLevelEnum eNum=adXactUnspecified;
158 pInterface->get_IsolationLevel(&eNum);
159 return eNum;
160}
161
162bool WpADOConnection::put_IsolationLevel(const IsolationLevelEnum& eNum)
163{
164 assert(pInterface);
165 return SUCCEEDED(pInterface->put_IsolationLevel(eNum));
166}
167
169{
170 assert(pInterface);
171 sal_Int32 nRet=0;
172 pInterface->get_Attributes(&nRet);
173 return nRet;
174}
175
177{
178 assert(pInterface);
179 return SUCCEEDED(pInterface->put_Attributes(nRet));
180}
181
182CursorLocationEnum WpADOConnection::get_CursorLocation() const
183{
184 assert(pInterface);
185 CursorLocationEnum eNum=adUseNone;
186 pInterface->get_CursorLocation(&eNum);
187 return eNum;
188}
189
190bool WpADOConnection::put_CursorLocation(const CursorLocationEnum &eNum)
191{
192 assert(pInterface);
193 return SUCCEEDED(pInterface->put_CursorLocation(eNum));
194}
195
196ConnectModeEnum WpADOConnection::get_Mode() const
197{
198 assert(pInterface);
199 ConnectModeEnum eNum=adModeUnknown;
200 pInterface->get_Mode(&eNum);
201 return eNum;
202}
203
204bool WpADOConnection::put_Mode(const ConnectModeEnum &eNum)
205{
206 assert(pInterface);
207 return SUCCEEDED(pInterface->put_Mode(eNum));
208}
209
211{
212 assert(pInterface);
213 sal::systools::BStr aBSTR; pInterface->get_Provider(&aBSTR);
214 return OUString(aBSTR);
215}
216
217bool WpADOConnection::put_Provider(std::u16string_view _bstr)
218{
219 assert(pInterface);
220 sal::systools::BStr bstr(_bstr);
221 return SUCCEEDED(pInterface->put_Provider(bstr));
222}
223
225{
226 assert(pInterface);
227 sal_Int32 nRet=0;
228 pInterface->get_State(&nRet);
229 return nRet;
230}
231
232bool WpADOConnection::OpenSchema(SchemaEnum eNum,OLEVariant const & Restrictions,OLEVariant const & SchemaID,ADORecordset**pprset)
233{
234 assert(pInterface);
235 return SUCCEEDED(pInterface->OpenSchema(eNum,Restrictions,SchemaID,pprset));
236}
237
239{
240 assert(pInterface);
241 sal::systools::BStr aBSTR;
242 pInterface->get_Version(&aBSTR);
243 return OUString(aBSTR);
244}
245
247{
248 assert(pInterface);
249 return SUCCEEDED(pInterface->putref_ActiveConnection(rCon));
250}
251
253{
254 assert(pInterface);
255 pInterface->put_ActiveConnection(vConn);
256}
257
259{
260 sal::systools::COMReference<IClassFactory2> pInterface2;
261 if (!FAILED(pInterface2.CoGetClassObject(ADOS::CLSID_ADOCOMMAND_21, CLSCTX_INPROC_SERVER)))
262 {
263 sal::systools::COMReference<ADOCommand> pCommand;
264
265 HRESULT hr = pInterface2->CreateInstanceLic(nullptr,
266 nullptr,
269 reinterpret_cast<void**>(&pCommand));
270
271 if( !FAILED( hr ) )
272 pInterface = std::move(pCommand);
273 }
274}
275
276sal_Int32 WpADOCommand::get_State() const
277{
278 assert(pInterface);
279 sal_Int32 nRet=0;
280 pInterface->get_State(&nRet);
281 return nRet;
282}
283
285{
286 assert(pInterface);
287 sal::systools::BStr aBSTR;
288 pInterface->get_CommandText(&aBSTR);
289 return OUString(aBSTR);
290}
291
292bool WpADOCommand::put_CommandText(std::u16string_view aCon)
293{
294 assert(pInterface);
295 sal::systools::BStr bstr(aCon);
296 bool bErg = SUCCEEDED(pInterface->put_CommandText(bstr));
297
298 return bErg;
299}
300
302{
303 assert(pInterface);
304 sal_Int32 nRet=0;
305 pInterface->get_CommandTimeout(&nRet);
306 return nRet;
307}
308
310{
311 assert(pInterface);
312 pInterface->put_CommandTimeout(nRet);
313}
314
316{
317 assert(pInterface);
318 VARIANT_BOOL bPrepared = VARIANT_FALSE;
319 pInterface->get_Prepared(&bPrepared);
320 return bPrepared == VARIANT_TRUE;
321}
322
323bool WpADOCommand::put_Prepared(VARIANT_BOOL bPrepared) const
324{
325 assert(pInterface);
326 return SUCCEEDED(pInterface->put_Prepared(bPrepared));
327}
328
329bool WpADOCommand::Execute(OLEVariant& RecordsAffected,OLEVariant& Params,long Options, ADORecordset** ppiRset)
330{
331 assert(pInterface);
332 return SUCCEEDED(pInterface->Execute(&RecordsAffected,&Params,Options,ppiRset));
333}
334
335ADOParameter* WpADOCommand::CreateParameter(std::u16string_view _bstr,DataTypeEnum Type,ParameterDirectionEnum Direction,long nSize,const OLEVariant &Value)
336{
337 assert(pInterface);
338 ADOParameter* pPara = nullptr;
339 sal::systools::BStr bstr(_bstr);
340 bool bErg = SUCCEEDED(pInterface->CreateParameter(bstr, Type, Direction, nSize, Value, &pPara));
341
342 return bErg ? pPara : nullptr;
343}
344
345ADOParameters* WpADOCommand::get_Parameters() const
346{
347 assert(pInterface);
348 ADOParameters* pPara=nullptr;
349 pInterface->get_Parameters(&pPara);
350 return pPara;
351}
352
353bool WpADOCommand::put_CommandType( /* [in] */ CommandTypeEnum lCmdType)
354{
355 assert(pInterface);
356 return SUCCEEDED(pInterface->put_CommandType(lCmdType));
357}
358
359CommandTypeEnum WpADOCommand::get_CommandType() const
360{
361 assert(pInterface);
362 CommandTypeEnum eNum=adCmdUnspecified;
363 pInterface->get_CommandType(&eNum);
364 return eNum;
365}
366
367// returns the name of the field
368OUString WpADOCommand::GetName() const
369{
370 assert(pInterface);
371 sal::systools::BStr aBSTR;
372 pInterface->get_Name(&aBSTR);
373 return OUString(aBSTR);
374}
375
376bool WpADOCommand::put_Name(std::u16string_view Name)
377{
378 assert(pInterface);
379 sal::systools::BStr bstr(Name);
380 bool bErg = SUCCEEDED(pInterface->put_Name(bstr));
381
382 return bErg;
383}
385{
386 assert(pInterface);
387 return SUCCEEDED(pInterface->Cancel());
388}
389
391{
392 assert(pInterface);
393 sal::systools::BStr aBSTR;
394 pInterface->get_Description(&aBSTR);
395 return OUString(aBSTR);
396}
397
398OUString WpADOError::GetSource() const
399{
400 assert(pInterface);
401 sal::systools::BStr aBSTR;
402 pInterface->get_Source(&aBSTR);
403 return OUString(aBSTR);
404}
405
406sal_Int32 WpADOError::GetNumber() const
407{
408 assert(pInterface);
409 sal_Int32 nErrNr=0;
410 pInterface->get_Number(&nErrNr);
411 return nErrNr;
412}
413
415{
416 assert(pInterface);
417 sal::systools::BStr aBSTR;
418 pInterface->get_SQLState(&aBSTR);
419 return OUString(aBSTR);
420}
421
423{
424 assert(pInterface);
425 sal_Int32 nErrNr=0;
426 pInterface->get_NativeError(&nErrNr);
427 return nErrNr;
428}
429
431{
432 assert(pInterface);
433 WpADOProperties pProps;
434 pInterface->get_Properties(&pProps);
435 return pProps;
436}
437
439{
440 assert(pInterface);
441 ADO_LONGPTR nActualSize=0;
442 pInterface->get_ActualSize(&nActualSize);
443 return nActualSize;
444}
445
447{
448 assert(pInterface);
449 sal_Int32 eADOSFieldAttributes=0;
450 pInterface->get_Attributes(&eADOSFieldAttributes);
451 return eADOSFieldAttributes;
452}
453
454sal_Int32 WpADOField::GetStatus() const
455{
456 assert(pInterface);
457 // pInterface->get_Status(&eADOSFieldAttributes);
458 return 0;
459}
460
462{
463 assert(pInterface);
464 ADO_LONGPTR nDefinedSize=0;
465 pInterface->get_DefinedSize(&nDefinedSize);
466 return nDefinedSize;
467}
468
469// returns the name of the field
470OUString WpADOField::GetName() const
471{
472 assert(pInterface);
473 sal::systools::BStr aBSTR;
474 pInterface->get_Name(&aBSTR);
475 return OUString(aBSTR);
476}
477
478DataTypeEnum WpADOField::GetADOType() const
479{
480 assert(pInterface);
481 DataTypeEnum eType=adEmpty;
482 pInterface->get_Type(&eType);
483 return eType;
484}
485
487{
488 assert(pInterface);
489 aValVar.setEmpty();
490 pInterface->get_Value(&aValVar);
491}
492
494{
495 assert(pInterface);
496 OLEVariant aValVar;
497 pInterface->get_Value(&aValVar);
498 return aValVar;
499}
500
501bool WpADOField::PutValue(const OLEVariant& aVariant)
502{
503 assert(pInterface);
504 return (SUCCEEDED(pInterface->put_Value(aVariant)));
505}
506
508{
509 assert(pInterface);
511 pInterface->get_Precision(&eType);
512 return eType;
513}
514
516{
517 assert(pInterface);
519 pInterface->get_NumericScale(&eType);
520 return eType;
521}
522
524{
525 assert(pInterface);
526 return (SUCCEEDED(pInterface->AppendChunk(Variant)));
527}
528
530{
531 assert(pInterface);
532 OLEVariant aValVar;
533 pInterface->GetChunk(Length,&aValVar);
534 return aValVar;
535}
536
537void WpADOField::GetChunk(long Length,OLEVariant &aValVar) const
538{
539 assert(pInterface);
540 pInterface->GetChunk(Length,&aValVar);
541}
542
544{
545 assert(pInterface);
546 OLEVariant aValVar;
547 pInterface->get_OriginalValue(&aValVar);
548 return aValVar;
549}
550
552{
553 assert(pInterface);
554 pInterface->get_OriginalValue(&aValVar);
555}
556
558{
559 assert(pInterface);
560 OLEVariant aValVar;
561 pInterface->get_UnderlyingValue(&aValVar);
562 return aValVar;
563}
564
566{
567 assert(pInterface);
568 pInterface->get_UnderlyingValue(&aValVar);
569}
570
572{
573 assert(pInterface);
574 return (SUCCEEDED(pInterface->put_Precision(_prec)));
575}
576
578{
579 assert(pInterface);
580 return (SUCCEEDED(pInterface->put_NumericScale(_prec)));
581}
582
583void WpADOField::PutADOType(DataTypeEnum eType)
584{
585 assert(pInterface);
586 pInterface->put_Type(eType);
587}
588
589bool WpADOField::PutDefinedSize(sal_Int32 _nDefSize)
590{
591 assert(pInterface);
592 return (SUCCEEDED(pInterface->put_DefinedSize(_nDefSize)));
593}
594
595bool WpADOField::PutAttributes(sal_Int32 _nDefSize)
596{
597 assert(pInterface);
598 return (SUCCEEDED(pInterface->put_Attributes(_nDefSize)));
599}
600
602{
603 OLEVariant aValVar;
604 if(pInterface)
605 pInterface->get_Value(&aValVar);
606 return aValVar;
607}
608
610{
611 assert(pInterface);
612 if(pInterface)
613 pInterface->get_Value(&aValVar);
614}
615
617{
618 assert(pInterface);
619 return (SUCCEEDED(pInterface->put_Value(aValVar)));
620}
621
623{
624 assert(pInterface);
625 sal::systools::BStr aBSTR;
626 pInterface->get_Name(&aBSTR);
627 return OUString(aBSTR);
628}
629
630DataTypeEnum WpADOProperty::GetADOType() const
631{
632 assert(pInterface);
633 DataTypeEnum eType=adEmpty;
634 pInterface->get_Type(&eType);
635 return eType;
636}
637
639{
640 assert(pInterface);
641 sal_Int32 eADOSFieldAttributes=0;
642 pInterface->get_Attributes(&eADOSFieldAttributes);
643 return eADOSFieldAttributes;
644}
645
646bool WpADOProperty::PutAttributes(sal_Int32 _nDefSize)
647{
648 assert(pInterface);
649 return (SUCCEEDED(pInterface->put_Attributes(_nDefSize)));
650}
652{
653 sal::systools::COMReference<IClassFactory2> pInterface2;
654 if (!FAILED(pInterface2.CoGetClassObject(ADOS::CLSID_ADORECORDSET_21, CLSCTX_INPROC_SERVER)))
655 {
656 sal::systools::COMReference<ADORecordset> pRec;
657 HRESULT hr = pInterface2->CreateInstanceLic(nullptr,
658 nullptr,
661 reinterpret_cast<void**>(&pRec));
662
663 if( !FAILED( hr ) )
664 pInterface = std::move(pRec);
665 }
666}
667
669 /* [optional][in] */ VARIANT Source,
670 /* [optional][in] */ VARIANT ActiveConnection,
671 /* [defaultvalue][in] */ CursorTypeEnum CursorType,
672 /* [defaultvalue][in] */ LockTypeEnum LockType,
673 /* [defaultvalue][in] */ sal_Int32 Options)
674{
675 assert(pInterface);
676 return (SUCCEEDED(pInterface->Open(Source,ActiveConnection,CursorType,LockType,Options)));
677}
678
679
681{
682 assert(pInterface);
683 LockTypeEnum eType=adLockUnspecified;
684 pInterface->get_LockType(&eType);
685 return eType;
686}
687
689{
690 assert(pInterface);
691 pInterface->Close();
692}
693
695{
696 assert(pInterface);
697 return (SUCCEEDED(pInterface->Cancel()));
698}
699
701{
702 assert(pInterface);
703 sal_Int32 nState = 0;
704 pInterface->get_State(&nState);
705 return nState;
706}
707
708bool WpADORecordset::Supports( /* [in] */ CursorOptionEnum CursorOptions)
709{
710 assert(pInterface);
711 VARIANT_BOOL bSupports=VARIANT_FALSE;
712 pInterface->Supports(CursorOptions,&bSupports);
713 return bSupports == VARIANT_TRUE;
714}
715
717{
718 assert(pInterface);
719 PositionEnum_Param aTemp=adPosUnknown;
720 pInterface->get_AbsolutePosition(&aTemp);
721 return aTemp;
722}
723
724void WpADORecordset::GetDataSource(IUnknown** _pInterface) const
725{
726 assert(pInterface);
727 pInterface->get_DataSource(_pInterface);
728}
729
730void WpADORecordset::PutRefDataSource(IUnknown* _pInterface)
731{
732 assert(pInterface);
733 pInterface->putref_DataSource(_pInterface);
734}
735
737{
738 assert(pInterface);
739 pInterface->get_Bookmark(&var);
740}
741
743{
744 assert(pInterface);
745 OLEVariant var;
746 pInterface->get_Bookmark(&var);
747 return var;
748}
749
750CompareEnum WpADORecordset::CompareBookmarks(const OLEVariant& left,const OLEVariant& right)
751{
752 assert(pInterface);
753 CompareEnum eNum=adCompareNotComparable;
754 pInterface->CompareBookmarks(left,right,&eNum);
755 return eNum;
756}
757
759{
760 assert(pInterface);
761 return SUCCEEDED(pInterface->put_Bookmark(pSafeAr));
762}
763
764
766{
767 assert(pInterface);
769 pInterface->get_Fields(&pFields);
770 return pFields;
771}
772
773
774bool WpADORecordset::Move(sal_Int32 nRows, VARIANT aBmk) {return pInterface && SUCCEEDED(pInterface->Move(nRows, aBmk));}
775bool WpADORecordset::MoveNext() {return pInterface && SUCCEEDED(pInterface->MoveNext());}
776bool WpADORecordset::MovePrevious() {return pInterface && SUCCEEDED(pInterface->MovePrevious());}
777bool WpADORecordset::MoveFirst() {return pInterface && SUCCEEDED(pInterface->MoveFirst());}
778bool WpADORecordset::MoveLast() {return pInterface && SUCCEEDED(pInterface->MoveLast());}
779
781{
782 assert(pInterface);
783 VARIANT_BOOL bIsAtBOF=VARIANT_FALSE;
784 pInterface->get_BOF(&bIsAtBOF);
785 return bIsAtBOF == VARIANT_TRUE;
786}
787
789{
790 assert(pInterface);
791 VARIANT_BOOL bIsAtEOF=VARIANT_FALSE;
792 pInterface->get_EOF(&bIsAtEOF);
793 return bIsAtEOF == VARIANT_TRUE;
794}
795
796bool WpADORecordset::Delete(AffectEnum eNum)
797{
798 assert(pInterface);
799 return SUCCEEDED(pInterface->Delete(eNum));
800}
801
802bool WpADORecordset::AddNew(const OLEVariant &FieldList,const OLEVariant &Values)
803{
804 assert(pInterface);
805 return SUCCEEDED(pInterface->AddNew(FieldList,Values));
806}
807
808bool WpADORecordset::Update(const OLEVariant &FieldList,const OLEVariant &Values)
809{
810 assert(pInterface);
811 return SUCCEEDED(pInterface->Update(FieldList,Values));
812}
813
815{
816 assert(pInterface);
817 return SUCCEEDED(pInterface->CancelUpdate());
818}
819
821{
822 assert(pInterface);
823 WpADOProperties pProps;
824 pInterface->get_Properties(&pProps);
825 return pProps;
826}
827
828bool WpADORecordset::NextRecordset(OLEVariant& RecordsAffected,ADORecordset** ppiRset)
829{
830 assert(pInterface);
831 return SUCCEEDED(pInterface->NextRecordset(&RecordsAffected,ppiRset));
832}
833
834bool WpADORecordset::get_RecordCount(ADO_LONGPTR &_nRet) const
835{
836 assert(pInterface);
837 return SUCCEEDED(pInterface->get_RecordCount(&_nRet));
838}
839
840bool WpADORecordset::get_MaxRecords(ADO_LONGPTR &_nRet) const
841{
842 assert(pInterface);
843 return SUCCEEDED(pInterface->get_MaxRecords(&_nRet));
844}
845
846bool WpADORecordset::put_MaxRecords(ADO_LONGPTR _nRet)
847{
848 assert(pInterface);
849 return SUCCEEDED(pInterface->put_MaxRecords(_nRet));
850}
851
852bool WpADORecordset::get_CursorType(CursorTypeEnum &_nRet) const
853{
854 assert(pInterface);
855 return SUCCEEDED(pInterface->get_CursorType(&_nRet));
856}
857
858bool WpADORecordset::put_CursorType(CursorTypeEnum _nRet)
859{
860 assert(pInterface);
861 return SUCCEEDED(pInterface->put_CursorType(_nRet));
862}
863
864bool WpADORecordset::get_LockType(LockTypeEnum &_nRet) const
865{
866 assert(pInterface);
867 return SUCCEEDED(pInterface->get_LockType(&_nRet));
868}
869
870bool WpADORecordset::put_LockType(LockTypeEnum _nRet)
871{
872 assert(pInterface);
873 return SUCCEEDED(pInterface->put_LockType(_nRet));
874}
875
876bool WpADORecordset::get_CacheSize(sal_Int32 &_nRet) const
877{
878 assert(pInterface);
879 return SUCCEEDED(pInterface->get_CacheSize(&_nRet));
880}
881
882bool WpADORecordset::put_CacheSize(sal_Int32 _nRet)
883{
884 assert(pInterface);
885 return SUCCEEDED(pInterface->put_CacheSize(_nRet));
886}
887
888bool WpADORecordset::UpdateBatch(AffectEnum AffectRecords)
889{
890 assert(pInterface);
891 return SUCCEEDED(pInterface->UpdateBatch(AffectRecords));
892}
893
895{
896 assert(pInterface);
897 sal::systools::BStr aBSTR;
898 pInterface->get_Name(&aBSTR);
899 return OUString(aBSTR);
900}
901
902DataTypeEnum WpADOParameter::GetADOType() const
903{
904 assert(pInterface);
905 DataTypeEnum eType=adEmpty;
906 pInterface->get_Type(&eType);
907 return eType;
908}
909
910void WpADOParameter::put_Type(const DataTypeEnum& _eType)
911{
912 assert(pInterface);
913 pInterface->put_Type(_eType);
914}
915
917{
918 assert(pInterface);
919 sal_Int32 eADOSFieldAttributes=0;
920 pInterface->get_Attributes(&eADOSFieldAttributes);
921 return eADOSFieldAttributes;
922}
923
925{
926 assert(pInterface);
928 pInterface->get_Precision(&eType);
929 return eType;
930}
931
933{
934 assert(pInterface);
936 pInterface->get_NumericScale(&eType);
937 return eType;
938}
939
940ParameterDirectionEnum WpADOParameter::get_Direction() const
941{
942 assert(pInterface);
943 ParameterDirectionEnum alParmDirection=adParamUnknown;
944 pInterface->get_Direction(&alParmDirection);
945 return alParmDirection;
946}
947
949{
950 assert(pInterface);
951 pInterface->get_Value(&aValVar);
952}
953
955{
956 assert(pInterface);
957 OLEVariant aValVar;
958 pInterface->get_Value(&aValVar);
959 return aValVar;
960}
961
963{
964 assert(pInterface);
965 return (SUCCEEDED(pInterface->put_Value(aVariant)));
966}
968{
969 assert(pInterface);
970 return (SUCCEEDED(pInterface->AppendChunk(aVariant)));
971}
972bool WpADOParameter::put_Size(sal_Int32 _nSize)
973{
974 assert(pInterface);
975 return (SUCCEEDED(pInterface->put_Size(_nSize)));
976}
977
978OUString WpADOColumn::get_Name() const
979{
980 assert(pInterface);
981 sal::systools::BStr aBSTR;
982 pInterface->get_Name(&aBSTR);
983 return OUString(aBSTR);
984}
985
987{
988 assert(pInterface);
989 sal::systools::BStr aBSTR;
990 pInterface->get_RelatedColumn(&aBSTR);
991 return OUString(aBSTR);
992}
993
994void WpADOColumn::put_Name(std::u16string_view _rName)
995{
996 assert(pInterface);
997 sal::systools::BStr bstr(_rName);
998 pInterface->put_Name(bstr);
999}
1000void WpADOColumn::put_RelatedColumn(std::u16string_view _rName)
1001{
1002 assert(pInterface);
1003 sal::systools::BStr bstr(_rName);
1004 pInterface->put_RelatedColumn(bstr);
1005}
1006
1007DataTypeEnum WpADOColumn::get_Type() const
1008{
1009 assert(pInterface);
1010 DataTypeEnum eNum = adVarChar;
1011 pInterface->get_Type(&eNum);
1012 return eNum;
1013}
1014
1015void WpADOColumn::put_Type(const DataTypeEnum& _eNum)
1016{
1017 assert(pInterface);
1018 pInterface->put_Type(_eNum);
1019}
1020
1022{
1023 assert(pInterface);
1024 sal_Int32 nPrec=0;
1025 pInterface->get_Precision(&nPrec);
1026 return nPrec;
1027}
1028
1029void WpADOColumn::put_Precision(sal_Int32 _nPre)
1030{
1031 assert(pInterface);
1032 pInterface->put_Precision(_nPre);
1033}
1034
1036{
1037 assert(pInterface);
1038 sal_Int32 nPrec=0;
1039 pInterface->get_DefinedSize(&nPrec);
1040 return nPrec;
1041}
1043{
1044 assert(pInterface);
1045 sal_uInt8 nPrec=0;
1046 pInterface->get_NumericScale(&nPrec);
1047 return nPrec;
1048}
1049
1051{
1052 assert(pInterface);
1053 pInterface->put_NumericScale(_nScale);
1054}
1055
1056SortOrderEnum WpADOColumn::get_SortOrder() const
1057{
1058 assert(pInterface);
1059 SortOrderEnum nPrec=adSortAscending;
1060 pInterface->get_SortOrder(&nPrec);
1061 return nPrec;
1062}
1063
1064void WpADOColumn::put_SortOrder(SortOrderEnum _nScale)
1065{
1066 assert(pInterface);
1067 pInterface->put_SortOrder(_nScale);
1068}
1069
1070ColumnAttributesEnum WpADOColumn::get_Attributes() const
1071{
1072 assert(pInterface);
1073 ColumnAttributesEnum eNum=adColNullable;
1074 pInterface->get_Attributes(&eNum);
1075 return eNum;
1076}
1077
1078bool WpADOColumn::put_Attributes(const ColumnAttributesEnum& _eNum)
1079{
1080 assert(pInterface);
1081 return SUCCEEDED(pInterface->put_Attributes(_eNum));
1082}
1083
1085{
1086 assert(pInterface);
1087 WpADOProperties pProps;
1088 pInterface->get_Properties(&pProps);
1089 return pProps;
1090}
1091
1092OUString WpADOKey::get_Name() const
1093{
1094 assert(pInterface);
1095 sal::systools::BStr aBSTR;
1096 pInterface->get_Name(&aBSTR);
1097 return OUString(aBSTR);
1098}
1099
1100void WpADOKey::put_Name(std::u16string_view _rName)
1101{
1102 assert(pInterface);
1103 sal::systools::BStr bstr(_rName);
1104 pInterface->put_Name(bstr);
1105}
1106
1107KeyTypeEnum WpADOKey::get_Type() const
1108{
1109 assert(pInterface);
1110 KeyTypeEnum eNum=adKeyPrimary;
1111 pInterface->get_Type(&eNum);
1112 return eNum;
1113}
1114
1115void WpADOKey::put_Type(const KeyTypeEnum& _eNum)
1116{
1117 assert(pInterface);
1118 pInterface->put_Type(_eNum);
1119}
1120
1122{
1123 assert(pInterface);
1124 sal::systools::BStr aBSTR;
1125 pInterface->get_RelatedTable(&aBSTR);
1126 return OUString(aBSTR);
1127}
1128
1129void WpADOKey::put_RelatedTable(std::u16string_view _rName)
1130{
1131 assert(pInterface);
1132 sal::systools::BStr bstr(_rName);
1133 pInterface->put_RelatedTable(bstr);
1134}
1135
1137{
1138 assert(pInterface);
1139 RuleEnum eNum = adRINone;
1140 pInterface->get_DeleteRule(&eNum);
1141 return eNum;
1142}
1143
1144void WpADOKey::put_DeleteRule(const RuleEnum& _eNum)
1145{
1146 assert(pInterface);
1147 pInterface->put_DeleteRule(_eNum);
1148}
1149
1151{
1152 assert(pInterface);
1153 RuleEnum eNum = adRINone;
1154 pInterface->get_UpdateRule(&eNum);
1155 return eNum;
1156}
1157
1158void WpADOKey::put_UpdateRule(const RuleEnum& _eNum)
1159{
1160 assert(pInterface);
1161 pInterface->put_UpdateRule(_eNum);
1162}
1163
1165{
1166 assert(pInterface);
1167 WpADOColumns pCols;
1168 pInterface->get_Columns(&pCols);
1169 return pCols;
1170}
1171
1172OUString WpADOIndex::get_Name() const
1173{
1174 assert(pInterface);
1175 sal::systools::BStr aBSTR;
1176 pInterface->get_Name(&aBSTR);
1177 return OUString(aBSTR);
1178}
1179
1180void WpADOIndex::put_Name(std::u16string_view _rName)
1181{
1182 assert(pInterface);
1183 sal::systools::BStr bstr(_rName);
1184 pInterface->put_Name(bstr);
1185}
1186
1188{
1189 assert(pInterface);
1190 VARIANT_BOOL eNum = VARIANT_FALSE;
1191 pInterface->get_Clustered(&eNum);
1192 return eNum == VARIANT_TRUE;
1193}
1194
1196{
1197 assert(pInterface);
1198 pInterface->put_Clustered(_b ? VARIANT_TRUE : VARIANT_FALSE);
1199}
1200
1202{
1203 assert(pInterface);
1204 VARIANT_BOOL eNum = VARIANT_FALSE;
1205 pInterface->get_Unique(&eNum);
1206 return eNum == VARIANT_TRUE;
1207}
1208
1210{
1211 assert(pInterface);
1212 pInterface->put_Unique(_b ? VARIANT_TRUE : VARIANT_FALSE);
1213}
1214
1216{
1217 assert(pInterface);
1218 VARIANT_BOOL eNum = VARIANT_FALSE;
1219 pInterface->get_PrimaryKey(&eNum);
1220 return eNum == VARIANT_TRUE;
1221}
1222
1224{
1225 assert(pInterface);
1226 pInterface->put_PrimaryKey(_b ? VARIANT_TRUE : VARIANT_FALSE);
1227}
1228
1230{
1231 assert(pInterface);
1232 WpADOColumns pCols;
1233 pInterface->get_Columns(&pCols);
1234 return pCols;
1235}
1236
1238{
1239 assert(pInterface);
1240 pInterface->putref_ActiveConnection(pCon);
1241}
1242
1244{
1245 assert(pInterface);
1246 WpADOTables pRet;
1247 pInterface->get_Tables(&pRet);
1248 return pRet;
1249}
1250
1252{
1253 assert(pInterface);
1254 WpADOViews pRet;
1255 pInterface->get_Views(&pRet);
1256 return pRet;
1257}
1258
1260{
1261 assert(pInterface);
1262 WpADOGroups pRet;
1263 pInterface->get_Groups(&pRet);
1264 return pRet;
1265}
1266
1268{
1269 assert(pInterface);
1270 WpADOUsers pRet;
1271 pInterface->get_Users(&pRet);
1272 return pRet;
1273}
1274
1276{
1277 assert(pInterface);
1278 ADOProcedures* pRet = nullptr;
1279 pInterface->get_Procedures(&pRet);
1280 return pRet;
1281}
1282
1283OUString WpADOTable::get_Name() const
1284{
1285 assert(pInterface);
1286 sal::systools::BStr aBSTR;
1287 pInterface->get_Name(&aBSTR);
1288 return OUString(aBSTR);
1289}
1290
1291void WpADOTable::put_Name(std::u16string_view _rName)
1292{
1293 assert(pInterface);
1294 sal::systools::BStr bstr(_rName);
1295 pInterface->put_Name(bstr);
1296}
1297
1298OUString WpADOTable::get_Type() const
1299{
1300 assert(pInterface);
1301 sal::systools::BStr aBSTR;
1302 pInterface->get_Type(&aBSTR);
1303 return OUString(aBSTR);
1304}
1305
1307{
1308 assert(pInterface);
1309 WpADOColumns pCols;
1310 pInterface->get_Columns(&pCols);
1311 return pCols;
1312}
1313
1315{
1316 assert(pInterface);
1317 WpADOIndexes pRet;
1318 pInterface->get_Indexes(&pRet);
1319 return pRet;
1320}
1321
1323{
1324 assert(pInterface);
1325 WpADOKeys pRet;
1326 pInterface->get_Keys(&pRet);
1327 return pRet;
1328}
1329
1331{
1332 assert(pInterface);
1333 WpADOCatalog pCat;
1334 pInterface->get_ParentCatalog(&pCat);
1335 return pCat;
1336}
1337
1339{
1340 assert(pInterface);
1341 WpADOProperties pProps;
1342 pInterface->get_Properties(&pProps);
1343 return pProps;
1344}
1345
1346OUString WpADOView::get_Name() const
1347{
1348 assert(pInterface);
1349 sal::systools::BStr aBSTR;
1350 pInterface->get_Name(&aBSTR);
1351 return OUString(aBSTR);
1352}
1353
1355{
1356 assert(pInterface);
1357 pInterface->get_Command(&_rVar);
1358}
1359
1361{
1362 assert(pInterface);
1363 pInterface->put_Command(_rVar);
1364}
1365
1366OUString WpADOGroup::get_Name() const
1367{
1368 sal::systools::BStr aBSTR;
1369 pInterface->get_Name(&aBSTR);
1370 return OUString(aBSTR);
1371}
1372
1373void WpADOGroup::put_Name(std::u16string_view _rName)
1374{
1375 sal::systools::BStr bstr(_rName);
1376 pInterface->put_Name(bstr);
1377}
1378
1380 /* [in] */ const OLEVariant& Name,
1381 /* [in] */ ObjectTypeEnum ObjectType)
1382{
1383 RightsEnum Rights=adRightNone;
1384 OLEVariant ObjectTypeId;
1385 ObjectTypeId.setNoArg();
1386 pInterface->GetPermissions(Name,ObjectType,ObjectTypeId,&Rights);
1387 return Rights;
1388}
1389
1391 /* [in] */ const OLEVariant& Name,
1392 /* [in] */ ObjectTypeEnum ObjectType,
1393 /* [in] */ ActionEnum Action,
1394 /* [in] */ RightsEnum Rights)
1395{
1396 OLEVariant ObjectTypeId;
1397 ObjectTypeId.setNoArg();
1398 return SUCCEEDED(pInterface->SetPermissions(Name,ObjectType,Action,Rights,adInheritNone,ObjectTypeId));
1399}
1400
1402{
1403 WpADOUsers pRet;
1404 pInterface->get_Users( &pRet);
1405 return pRet;
1406}
1407
1408OUString WpADOUser::get_Name() const
1409{
1410 sal::systools::BStr aBSTR;
1411 pInterface->get_Name(&aBSTR);
1412 return OUString(aBSTR);
1413}
1414
1415void WpADOUser::put_Name(std::u16string_view _rName)
1416{
1417 sal::systools::BStr bstr(_rName);
1418 pInterface->put_Name(bstr);
1419}
1420
1421bool WpADOUser::ChangePassword(std::u16string_view _rPwd,std::u16string_view _rNewPwd)
1422{
1423 sal::systools::BStr sStr1(_rPwd);
1424 sal::systools::BStr sStr2(_rNewPwd);
1425 bool bErg = SUCCEEDED(pInterface->ChangePassword(sStr1, sStr2));
1426 return bErg;
1427}
1428
1430{
1431 WpADOGroups pRet;
1432 pInterface->get_Groups(&pRet);
1433 return pRet;
1434}
1435
1437 /* [in] */ const OLEVariant& Name,
1438 /* [in] */ ObjectTypeEnum ObjectType)
1439{
1440 RightsEnum Rights=adRightNone;
1441 OLEVariant ObjectTypeId;
1442 ObjectTypeId.setNoArg();
1443 pInterface->GetPermissions(Name,ObjectType,ObjectTypeId,&Rights);
1444 return Rights;
1445}
1446
1448 /* [in] */ const OLEVariant& Name,
1449 /* [in] */ ObjectTypeEnum ObjectType,
1450 /* [in] */ ActionEnum Action,
1451 /* [in] */ RightsEnum Rights)
1452{
1453 OLEVariant ObjectTypeId;
1454 ObjectTypeId.setNoArg();
1455 return SUCCEEDED(pInterface->SetPermissions(Name,ObjectType,Action,Rights,adInheritNone,ObjectTypeId));
1456}
1457
1458ADORecordset* WpADOConnection::getExportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
1459{
1460 // Create elements used in the array
1461 SAFEARRAYBOUND rgsabound[1];
1462 SAFEARRAY *psa = nullptr;
1463 OLEVariant varCriteria[6];
1464
1465 // Create SafeArray Bounds and initialize the array
1466 rgsabound[0].lLbound = 0;
1467 rgsabound[0].cElements = std::size(varCriteria);
1468 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1469
1470 sal_Int32 nPos=0;
1471 if(catalog.hasValue())
1472 varCriteria[nPos].setString(::comphelper::getString(catalog));
1473
1474 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1475 if(schema.getLength() && schema.toChar() != '%')
1476 varCriteria[nPos].setString(schema);
1477 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1478
1479 varCriteria[nPos].setString(table);
1480 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1481
1482 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1483 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1484 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1485
1486 OLEVariant vtEmpty;
1487 vtEmpty.setNoArg();
1488
1489 // Initialize and fill the SafeArray
1490 OLEVariant vsa;
1491 vsa.setArray(psa,VT_VARIANT);
1492
1493 ADORecordset *pRecordset = nullptr;
1494 OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset);
1495 return pRecordset;
1496}
1497
1498ADORecordset* WpADOConnection::getImportedKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
1499{
1500 // Create elements used in the array
1501 SAFEARRAYBOUND rgsabound[1];
1502 SAFEARRAY *psa = nullptr;
1503 OLEVariant varCriteria[6];
1504
1505 // Create SafeArray Bounds and initialize the array
1506 rgsabound[0].lLbound = 0;
1507 rgsabound[0].cElements = std::size(varCriteria);
1508 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1509
1510 sal_Int32 nPos=0;
1511 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1512 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1513 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1514
1515 if(catalog.hasValue())
1516 varCriteria[nPos].setString(::comphelper::getString(catalog));
1517
1518 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1519 if(schema.getLength() && schema.toChar() != '%')
1520 varCriteria[nPos].setString(schema);
1521 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1522
1523 varCriteria[nPos].setString(table);
1524 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1525
1526 OLEVariant vtEmpty;
1527 vtEmpty.setNoArg();
1528
1529 // Initialize and fill the SafeArray
1530 OLEVariant vsa;
1531 vsa.setArray(psa,VT_VARIANT);
1532
1533 ADORecordset *pRecordset = nullptr;
1534 OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset);
1535
1536 return pRecordset;
1537
1538}
1539
1540ADORecordset* WpADOConnection::getPrimaryKeys( const css::uno::Any& catalog, const OUString& schema, std::u16string_view table )
1541{
1542 // Create elements used in the array
1543 SAFEARRAYBOUND rgsabound[1];
1544 SAFEARRAY *psa = nullptr;
1545 OLEVariant varCriteria[3];
1546
1547 // Create SafeArray Bounds and initialize the array
1548 rgsabound[0].lLbound = 0;
1549 rgsabound[0].cElements = std::size(varCriteria);
1550 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1551
1552 sal_Int32 nPos=0;
1553 if(catalog.hasValue())
1554 varCriteria[nPos].setString(::comphelper::getString(catalog));
1555
1556 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1557 if(schema.getLength() && schema.toChar() != '%')
1558 varCriteria[nPos].setString(schema);
1559 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1560
1561 varCriteria[nPos].setString(table);
1562 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1563
1564
1565 OLEVariant vtEmpty;
1566 vtEmpty.setNoArg();
1567
1568 // Initialize and fill the SafeArray
1569 OLEVariant vsa;
1570 vsa.setArray(psa,VT_VARIANT);
1571
1572 ADORecordset *pRecordset = nullptr;
1573 OpenSchema(adSchemaPrimaryKeys,vsa,vtEmpty,&pRecordset);
1574
1575 return pRecordset;
1576}
1577
1579 const css::uno::Any& catalog, const OUString& schema, std::u16string_view table,
1580 bool /*unique*/, bool /*approximate*/ )
1581{
1582 // Create elements used in the array
1583 SAFEARRAYBOUND rgsabound[1];
1584 SAFEARRAY *psa = nullptr;
1585 OLEVariant varCriteria[5];
1586
1587 // Create SafeArray Bounds and initialize the array
1588 rgsabound[0].lLbound = 0;
1589 rgsabound[0].cElements = std::size(varCriteria);
1590 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1591
1592 sal_Int32 nPos=0;
1593 if(catalog.hasValue())
1594 varCriteria[nPos].setString(::comphelper::getString(catalog));
1595
1596 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1597 if(schema.getLength() && schema.toChar() != '%')
1598 varCriteria[nPos].setString(schema);
1599 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1600
1601 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// INDEX_NAME
1602
1603 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TYPE
1604
1605 varCriteria[nPos].setString(table);
1606 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1607
1608 OLEVariant vtEmpty;
1609 vtEmpty.setNoArg();
1610
1611 // Initialize and fill the SafeArray
1612 OLEVariant vsa;
1613 vsa.setArray(psa,VT_VARIANT);
1614
1615 ADORecordset *pRecordset = nullptr;
1616 OpenSchema(adSchemaIndexes,vsa,vtEmpty,&pRecordset);
1617
1618 return pRecordset;
1619}
1620
1621ADORecordset* WpADOConnection::getTablePrivileges( const css::uno::Any& catalog,
1622 const OUString& schemaPattern,
1623 std::u16string_view tableNamePattern )
1624{
1625 SAFEARRAYBOUND rgsabound[1];
1626 SAFEARRAY *psa = nullptr;
1627 OLEVariant varCriteria[5];
1628
1629 // Create SafeArray Bounds and initialize the array
1630 rgsabound[0].lLbound = 0;
1631 rgsabound[0].cElements = std::size(varCriteria);
1632 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1633
1634 sal_Int32 nPos=0;
1635 if(catalog.hasValue())
1636 varCriteria[nPos].setString(::comphelper::getString(catalog));
1637
1638 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1639 if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
1640 varCriteria[nPos].setString(schemaPattern);
1641 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1642
1643 if(!o3tl::starts_with(tableNamePattern, u"%"))
1644 varCriteria[nPos].setString(tableNamePattern);
1645 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1646
1647 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// GRANTOR
1648 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// GRANTEE
1649
1650 OLEVariant vtEmpty;
1651 vtEmpty.setNoArg();
1652
1653 // Initialize and fill the SafeArray
1654 OLEVariant vsa;
1655 vsa.setArray(psa,VT_VARIANT);
1656
1657 ADORecordset *pRecordset = nullptr;
1658 OpenSchema(adSchemaTablePrivileges,vsa,vtEmpty,&pRecordset);
1659
1660 return pRecordset;
1661}
1662
1663ADORecordset* WpADOConnection::getCrossReference( const css::uno::Any& primaryCatalog,
1664 const OUString& primarySchema,
1665 std::u16string_view primaryTable,
1666 const css::uno::Any& foreignCatalog,
1667 const OUString& foreignSchema,
1668 std::u16string_view foreignTable)
1669{
1670 // Create elements used in the array
1671 SAFEARRAYBOUND rgsabound[1];
1672 SAFEARRAY *psa = nullptr;
1673 OLEVariant varCriteria[6];
1674
1675 // Create SafeArray Bounds and initialize the array
1676 rgsabound[0].lLbound = 0;
1677 rgsabound[0].cElements = std::size(varCriteria);
1678 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1679
1680 sal_Int32 nPos=0;
1681 if(primaryCatalog.hasValue())
1682 varCriteria[nPos].setString(::comphelper::getString(primaryCatalog));
1683
1684 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1685 if(primarySchema.getLength() && primarySchema.toChar() != '%')
1686 varCriteria[nPos].setString(primarySchema);
1687 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1688
1689 varCriteria[nPos].setString(primaryTable);
1690 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1691
1692 if(foreignCatalog.hasValue())
1693 varCriteria[nPos].setString(::comphelper::getString(foreignCatalog));
1694
1695 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1696 if(foreignSchema.getLength() && foreignSchema.toChar() != '%')
1697 varCriteria[nPos].setString(foreignSchema);
1698 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1699
1700 varCriteria[nPos].setString(foreignTable);
1701 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1702
1703 OLEVariant vtEmpty;
1704 vtEmpty.setNoArg();
1705
1706 // Initialize and fill the SafeArray
1707 OLEVariant vsa;
1708 vsa.setArray(psa,VT_VARIANT);
1709
1710 ADORecordset *pRecordset = nullptr;
1711 OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset);
1712
1713 return pRecordset;
1714}
1715
1716ADORecordset* WpADOConnection::getProcedures( const css::uno::Any& catalog,
1717 const OUString& schemaPattern,
1718 std::u16string_view procedureNamePattern )
1719{
1720 SAFEARRAYBOUND rgsabound[1];
1721 SAFEARRAY *psa = nullptr;
1722 OLEVariant varCriteria[3];
1723
1724 // Create SafeArray Bounds and initialize the array
1725 rgsabound[0].lLbound = 0;
1726 rgsabound[0].cElements = std::size(varCriteria);
1727 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1728
1729 sal_Int32 nPos=0;
1730 if(catalog.hasValue())
1731 varCriteria[nPos].setString(::comphelper::getString(catalog));
1732
1733 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1734 if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
1735 varCriteria[nPos].setString(schemaPattern);
1736 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1737
1738 if(!o3tl::starts_with(procedureNamePattern, u"%"))
1739 varCriteria[nPos].setString(procedureNamePattern);
1740 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1741
1742 OLEVariant vtEmpty;
1743 vtEmpty.setNoArg();
1744
1745 // Initialize and fill the SafeArray
1746 OLEVariant vsa;
1747 vsa.setArray(psa,VT_VARIANT);
1748
1749 ADORecordset *pRecordset = nullptr;
1750 OpenSchema(adSchemaProcedures,vsa,vtEmpty,&pRecordset);
1751
1752 return pRecordset;
1753}
1754
1755ADORecordset* WpADOConnection::getProcedureColumns( const css::uno::Any& catalog,
1756 const OUString& schemaPattern,
1757 std::u16string_view procedureNamePattern,
1758 std::u16string_view columnNamePattern )
1759{
1760 // Create elements used in the array
1761 SAFEARRAYBOUND rgsabound[1];
1762 SAFEARRAY *psa = nullptr;
1763 OLEVariant varCriteria[4];
1764
1765 // Create SafeArray Bounds and initialize the array
1766 rgsabound[0].lLbound = 0;
1767 rgsabound[0].cElements = std::size(varCriteria);
1768 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1769
1770 sal_Int32 nPos=0;
1771 if(catalog.hasValue())
1772 varCriteria[nPos].setString(::comphelper::getString(catalog));
1773
1774 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1775 if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
1776 varCriteria[nPos].setString(schemaPattern);
1777 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1778
1779 if(!o3tl::starts_with(procedureNamePattern, u"%"))
1780 varCriteria[nPos].setString(procedureNamePattern);
1781 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1782
1783 if(!o3tl::starts_with(columnNamePattern, u"%"))
1784 varCriteria[nPos].setString(columnNamePattern);
1785 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// COLUMN_NAME
1786
1787 OLEVariant vtEmpty;
1788 vtEmpty.setNoArg();
1789
1790 // Initialize and fill the SafeArray
1791 OLEVariant vsa;
1792 vsa.setArray(psa,VT_VARIANT);
1793
1794 ADORecordset *pRecordset = nullptr;
1795 OpenSchema(adSchemaProcedureParameters,vsa,vtEmpty,&pRecordset);
1796
1797 return pRecordset;
1798}
1799
1800ADORecordset* WpADOConnection::getTables( const css::uno::Any& catalog,
1801 const OUString& schemaPattern,
1802 std::u16string_view tableNamePattern,
1803 const css::uno::Sequence< OUString >& types )
1804{
1805 // Create elements used in the array
1806 HRESULT hr = S_OK;
1807 OLEVariant varCriteria[4];
1808
1809 sal_Int32 nPos=0;
1810 OUString sCatalog;
1811 if ( catalog.hasValue() && (catalog >>= sCatalog) )
1812 varCriteria[nPos].setString(sCatalog);
1813
1814 ++nPos;
1815 if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
1816 varCriteria[nPos].setString(schemaPattern);
1817
1818 ++nPos;
1819 if(!o3tl::starts_with(tableNamePattern, u"%"))
1820 varCriteria[nPos].setString(tableNamePattern);
1821
1822 ++nPos;
1823 OUStringBuffer aTypes;
1824 const OUString* pIter = types.getConstArray();
1825 const OUString* pEnd = pIter + types.getLength();
1826 for( ; pIter != pEnd ; ++pIter)
1827 {
1828 if ( aTypes.getLength() )
1829 aTypes.append(",");
1830 aTypes.append(*pIter);
1831 }
1832
1833 OUString sTypeNames = aTypes.makeStringAndClear();
1834 if ( sTypeNames.getLength() )
1835 varCriteria[nPos].setString(sTypeNames);
1836
1837 // Create SafeArray Bounds and initialize the array
1838 const sal_Int32 nCrit = std::size(varCriteria);
1839 SAFEARRAYBOUND rgsabound[1];
1840 rgsabound[0].lLbound = 0;
1841 rgsabound[0].cElements = nCrit;
1842 SAFEARRAY *psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1843
1844 // Set the values for each element of the array
1845 for( LONG i = 0 ; i < nCrit && SUCCEEDED( hr );i++)
1846 {
1847 hr = SafeArrayPutElement(psa, &i,&varCriteria[i]);
1848 }
1849
1850 OLEVariant vtEmpty;
1851 vtEmpty.setNoArg();
1852
1853 // Initialize and fill the SafeArray
1854 OLEVariant vsa;
1855 vsa.setArray(psa,VT_VARIANT);
1856
1857 ADORecordset *pRecordset = nullptr;
1858 OpenSchema(adSchemaTables,vsa,vtEmpty,&pRecordset);
1859
1860 return pRecordset;
1861}
1862
1863ADORecordset* WpADOConnection::getColumns( const css::uno::Any& catalog,
1864 const OUString& schemaPattern,
1865 std::u16string_view tableNamePattern,
1866 std::u16string_view columnNamePattern )
1867{
1868 // Create elements used in the array
1869 SAFEARRAYBOUND rgsabound[1];
1870 SAFEARRAY *psa = nullptr;
1871 OLEVariant varCriteria[4];
1872
1873 // Create SafeArray Bounds and initialize the array
1874 rgsabound[0].lLbound = 0;
1875 rgsabound[0].cElements = std::size(varCriteria);
1876 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1877
1878 sal_Int32 nPos=0;
1879 if(catalog.hasValue())
1880 varCriteria[nPos].setString(::comphelper::getString(catalog));
1881
1882 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1883 if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
1884 varCriteria[nPos].setString(schemaPattern);
1885 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1886
1887 if(!o3tl::starts_with(tableNamePattern, u"%"))
1888 varCriteria[nPos].setString(tableNamePattern);
1889 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1890
1891 varCriteria[nPos].setString(columnNamePattern);
1892 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// COLUMN_NAME
1893
1894 OLEVariant vtEmpty;
1895 vtEmpty.setNoArg();
1896
1897 // Initialize and fill the SafeArray
1898 OLEVariant vsa;
1899 vsa.setArray(psa,VT_VARIANT);
1900
1901 ADORecordset *pRecordset = nullptr;
1902 OpenSchema(adSchemaColumns,vsa,vtEmpty,&pRecordset);
1903
1904 return pRecordset;
1905}
1906
1907ADORecordset* WpADOConnection::getColumnPrivileges( const css::uno::Any& catalog,
1908 const OUString& schema,
1909 std::u16string_view table,
1910 std::u16string_view columnNamePattern )
1911{
1912 // Create elements used in the array
1913 SAFEARRAYBOUND rgsabound[1];
1914 SAFEARRAY *psa = nullptr;
1915 OLEVariant varCriteria[4];
1916
1917 // Create SafeArray Bounds and initialize the array
1918 rgsabound[0].lLbound = 0;
1919 rgsabound[0].cElements = std::size(varCriteria);
1920 psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1921
1922 sal_Int32 nPos=0;
1923 if(catalog.hasValue())
1924 varCriteria[nPos].setString(::comphelper::getString(catalog));
1925
1926 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
1927 if(schema.getLength() && schema.toChar() != '%')
1928 varCriteria[nPos].setString(schema);
1929 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
1930
1931 varCriteria[nPos].setString(table);
1932 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
1933
1934 varCriteria[nPos].setString(columnNamePattern);
1935 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// COLUMN_NAME
1936
1937 OLEVariant vtEmpty;
1938 vtEmpty.setNoArg();
1939
1940 // Initialize and fill the SafeArray
1941 OLEVariant vsa;
1942 vsa.setArray(psa,VT_VARIANT);
1943
1944 ADORecordset *pRecordset = nullptr;
1945 OpenSchema(adSchemaColumnPrivileges,vsa,vtEmpty,&pRecordset);
1946
1947 return pRecordset;
1948}
1949
1950ADORecordset* WpADOConnection::getTypeInfo(DataTypeEnum /*_eType*/)
1951{
1952 // Create elements used in the array
1953 OLEVariant varCriteria[2];
1954 const int nCrit = std::size(varCriteria);
1955 // Create SafeArray Bounds and initialize the array
1956 SAFEARRAYBOUND rgsabound[1];
1957 rgsabound[0].lLbound = 0;
1958 rgsabound[0].cElements = nCrit;
1959 SAFEARRAY *psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
1960
1961 sal_Int32 nPos = 0;
1962 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;
1963 SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;
1964
1965 // Initialize and fill the SafeArray
1966 OLEVariant vsa;
1967 vsa.setArray(psa,VT_VARIANT);
1968
1969 OLEVariant aEmpty;
1970 aEmpty.setNoArg();
1971
1972 ADORecordset *pRec=nullptr;
1973 OpenSchema(adSchemaProviderTypes,vsa,aEmpty,&pRec);
1974
1975 return pRec;
1976}
1977
1978void WpADOColumn::put_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject)
1979{
1980 assert(pInterface);
1981 bool bRet = SUCCEEDED(pInterface->put_ParentCatalog(ppvObject));
1982 SAL_WARN_IF(!bRet, "connectivity.ado", "Could not set ParentCatalog!");
1983}
1984
1985void WpADOTable::putref_ParentCatalog(/* [in] */ _ADOCatalog __RPC_FAR *ppvObject)
1986{
1987 assert(pInterface);
1988 bool bRet = SUCCEEDED(pInterface->putref_ParentCatalog(ppvObject));
1989 SAL_WARN_IF(!bRet, "connectivity.ado", "Could not set ParentCatalog!");
1990}
1991
1992void OTools::putValue(const WpADOProperties& _rProps,const OLEVariant &_aPosition,const OLEVariant &_aValVar)
1993{
1994 SAL_WARN_IF(!_rProps.IsValid(), "connectivity.ado", "Properties are not valid!");
1995 WpADOProperty aProp(_rProps.GetItem(_aPosition));
1996 if ( aProp.IsValid() )
1997 {
1998 bool bRet = aProp.PutValue(_aValVar);
1999 SAL_WARN_IF(!bRet, "connectivity.ado", "Could not put value!");
2000 }
2001}
2002
2004{
2005 WpADOProperty aProp(_rProps.GetItem(_aPosition));
2006 return aProp.GetValue();
2007}
2008
2009/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OptionalString sCatalog
static const CLSID CLSID_ADOCOMMAND_21
Definition: adoimp.hxx:45
static const IID IID_ADOCOMMAND_21
Definition: adoimp.hxx:46
static const CLSID CLSID_ADOCATALOG_25
Definition: adoimp.hxx:39
static sal::systools::BStr & GetKeyStr()
Definition: adoimp.cxx:71
static const CLSID CLSID_ADORECORDSET_21
Definition: adoimp.hxx:48
static const IID IID_ADORECORDSET_21
Definition: adoimp.hxx:49
void setString(std::u16string_view us)
void setArray(SAFEARRAY *pSafeArray, VARTYPE vtType)
static OLEVariant getValue(const WpADOProperties &_rProps, const OLEVariant &_aPosition)
getValue returns a specific property value
Definition: Awrapado.cxx:2003
static void putValue(const WpADOProperties &_rProps, const OLEVariant &_aPosition, const OLEVariant &_aValVar)
putValue set the property value at the ado column
Definition: Awrapado.cxx:1992
ADOProcedures * get_Procedures()
Definition: Awrapado.cxx:1275
void putref_ActiveConnection(IDispatch *pCon)
Definition: Awrapado.cxx:1237
DataTypeEnum get_Type() const
Definition: Awrapado.cxx:1007
SortOrderEnum get_SortOrder() const
Definition: Awrapado.cxx:1056
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:994
void put_NumericScale(sal_Int8 _nScale)
Definition: Awrapado.cxx:1050
sal_uInt8 get_NumericScale() const
Definition: Awrapado.cxx:1042
sal_Int32 get_DefinedSize() const
Definition: Awrapado.cxx:1035
OUString get_RelatedColumn() const
Definition: Awrapado.cxx:986
sal_Int32 get_Precision() const
Definition: Awrapado.cxx:1021
WpADOProperties get_Properties() const
Definition: Awrapado.cxx:1084
bool put_Attributes(const ColumnAttributesEnum &_eNum)
Definition: Awrapado.cxx:1078
void put_SortOrder(SortOrderEnum _nScale)
Definition: Awrapado.cxx:1064
void put_RelatedColumn(std::u16string_view _rName)
Definition: Awrapado.cxx:1000
void put_Type(const DataTypeEnum &_eNum)
Definition: Awrapado.cxx:1015
void put_Precision(sal_Int32 _nPre)
Definition: Awrapado.cxx:1029
void put_ParentCatalog(_ADOCatalog __RPC_FAR *ppvObject)
Definition: Awrapado.cxx:1978
ColumnAttributesEnum get_Attributes() const
Definition: Awrapado.cxx:1070
ADOParameters * get_Parameters() const
Definition: Awrapado.cxx:345
bool put_Prepared(VARIANT_BOOL bPrepared) const
Definition: Awrapado.cxx:323
bool put_CommandType(CommandTypeEnum lCmdType)
Definition: Awrapado.cxx:353
sal_Int32 get_CommandTimeout() const
Definition: Awrapado.cxx:301
void put_ActiveConnection(const OLEVariant &vConn)
Definition: Awrapado.cxx:252
void put_CommandTimeout(sal_Int32 nRet)
Definition: Awrapado.cxx:309
ADOParameter * CreateParameter(std::u16string_view _bstr, DataTypeEnum Type, ParameterDirectionEnum Direction, long nSize, const OLEVariant &Value)
Definition: Awrapado.cxx:335
CommandTypeEnum get_CommandType() const
Definition: Awrapado.cxx:359
sal_Int32 get_State() const
Definition: Awrapado.cxx:276
bool Execute(OLEVariant &RecordsAffected, OLEVariant &Parameters, long Options, ADORecordset **ppiRset)
Definition: Awrapado.cxx:329
OUString get_CommandText() const
Definition: Awrapado.cxx:284
bool put_CommandText(std::u16string_view aCon)
Definition: Awrapado.cxx:292
bool put_Name(std::u16string_view Name)
Definition: Awrapado.cxx:376
bool putref_ActiveConnection(const WpADOConnection &rCon)
Definition: Awrapado.cxx:246
ADORecordset * getExportedKeys(const css::uno::Any &catalog, const OUString &schema, std::u16string_view table)
Definition: Awrapado.cxx:1458
bool put_Provider(std::u16string_view _bstr)
Definition: Awrapado.cxx:217
ADORecordset * getIndexInfo(const css::uno::Any &catalog, const OUString &schema, std::u16string_view table, bool unique, bool approximate)
Definition: Awrapado.cxx:1578
bool GetErrors(ADOErrors **pErrors)
Definition: Awrapado.cxx:132
ADORecordset * getColumnPrivileges(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view table, std::u16string_view columnNamePattern)
Definition: Awrapado.cxx:1907
bool OpenSchema(SchemaEnum eNum, OLEVariant const &Restrictions, OLEVariant const &SchemaID, ADORecordset **pprset)
Definition: Awrapado.cxx:232
ADORecordset * getColumns(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view tableNamePattern, std::u16string_view columnNamePattern)
Definition: Awrapado.cxx:1863
OUString GetConnectionString() const
Definition: Awrapado.cxx:44
bool put_Mode(const ConnectModeEnum &eNum)
Definition: Awrapado.cxx:204
sal_Int32 GetCommandTimeout() const
Definition: Awrapado.cxx:61
OUString GetDefaultDatabase() const
Definition: Awrapado.cxx:138
sal_Int32 GetConnectionTimeout() const
Definition: Awrapado.cxx:75
bool put_Attributes(sal_Int32 nRet)
Definition: Awrapado.cxx:176
ADORecordset * getCrossReference(const css::uno::Any &primaryCatalog, const OUString &primarySchema, std::u16string_view primaryTable, const css::uno::Any &foreignCatalog, const OUString &foreignSchema, std::u16string_view foreignTable)
Definition: Awrapado.cxx:1663
WpADOProperties get_Properties() const
Definition: Awrapado.cxx:37
ADORecordset * getImportedKeys(const css::uno::Any &catalog, const OUString &schema, std::u16string_view table)
Definition: Awrapado.cxx:1498
sal_Int32 get_Attributes() const
Definition: Awrapado.cxx:168
ADORecordset * getTables(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view tableNamePattern, const css::uno::Sequence< OUString > &types)
Definition: Awrapado.cxx:1800
bool put_CursorLocation(const CursorLocationEnum &eNum)
Definition: Awrapado.cxx:190
bool Execute(std::u16string_view CommandText, OLEVariant &RecordsAffected, long Options, WpADORecordset **ppiRset)
Definition: Awrapado.cxx:95
bool Open(std::u16string_view ConnectionString, std::u16string_view UserID, std::u16string_view Password, long Options)
Definition: Awrapado.cxx:122
void PutConnectionTimeout(sal_Int32 nRet)
Definition: Awrapado.cxx:83
ADORecordset * getProcedures(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view procedureNamePattern)
Definition: Awrapado.cxx:1716
ADORecordset * getTypeInfo(DataTypeEnum _eType=adEmpty)
Definition: Awrapado.cxx:1950
ADORecordset * getTablePrivileges(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view tableNamePattern)
Definition: Awrapado.cxx:1621
ADORecordset * getPrimaryKeys(const css::uno::Any &catalog, const OUString &schema, std::u16string_view table)
Definition: Awrapado.cxx:1540
void PutCommandTimeout(sal_Int32 nRet)
Definition: Awrapado.cxx:69
bool put_IsolationLevel(const IsolationLevelEnum &eNum)
Definition: Awrapado.cxx:162
IsolationLevelEnum get_IsolationLevel() const
Definition: Awrapado.cxx:154
ADORecordset * getProcedureColumns(const css::uno::Any &catalog, const OUString &schemaPattern, std::u16string_view procedureNamePattern, std::u16string_view columnNamePattern)
Definition: Awrapado.cxx:1755
ConnectModeEnum get_Mode() const
Definition: Awrapado.cxx:196
CursorLocationEnum get_CursorLocation() const
Definition: Awrapado.cxx:182
bool PutDefaultDatabase(std::u16string_view _bstr)
Definition: Awrapado.cxx:145
bool PutConnectionString(std::u16string_view aCon) const
Definition: Awrapado.cxx:52
OUString GetDescription() const
Definition: Awrapado.cxx:390
sal_Int32 GetNumber() const
Definition: Awrapado.cxx:406
sal_Int32 GetNativeError() const
Definition: Awrapado.cxx:422
OUString GetSource() const
Definition: Awrapado.cxx:398
OUString GetSQLState() const
Definition: Awrapado.cxx:414
DataTypeEnum GetADOType() const
Definition: Awrapado.cxx:478
OLEVariant GetChunk(long Length) const
Definition: Awrapado.cxx:529
bool PutAttributes(sal_Int32 _nDefSize)
Definition: Awrapado.cxx:595
WpADOProperties get_Properties()
Definition: Awrapado.cxx:430
sal_Int32 GetStatus() const
Definition: Awrapado.cxx:454
OLEVariant GetOriginalValue() const
Definition: Awrapado.cxx:543
OUString GetName() const
Definition: Awrapado.cxx:470
sal_Int32 GetDefinedSize() const
Definition: Awrapado.cxx:461
sal_Int32 GetActualSize() const
Definition: Awrapado.cxx:438
bool PutValue(const OLEVariant &aVariant)
Definition: Awrapado.cxx:501
bool AppendChunk(const OLEVariant &Variant)
Definition: Awrapado.cxx:523
bool PutDefinedSize(sal_Int32 _nDefSize)
Definition: Awrapado.cxx:589
void PutADOType(DataTypeEnum eType)
Definition: Awrapado.cxx:583
bool PutNumericScale(sal_Int8 _prec)
Definition: Awrapado.cxx:577
sal_Int32 GetPrecision() const
Definition: Awrapado.cxx:507
OLEVariant get_Value() const
Definition: Awrapado.cxx:493
sal_Int32 GetNumericScale() const
Definition: Awrapado.cxx:515
bool PutPrecision(sal_Int8 _prec)
Definition: Awrapado.cxx:571
sal_Int32 GetAttributes() const
Definition: Awrapado.cxx:446
OLEVariant GetUnderlyingValue() const
Definition: Awrapado.cxx:557
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:1373
RightsEnum GetPermissions(const OLEVariant &Name, ObjectTypeEnum ObjectType)
Definition: Awrapado.cxx:1379
bool SetPermissions(const OLEVariant &Name, ObjectTypeEnum ObjectType, ActionEnum Action, RightsEnum Rights)
Definition: Awrapado.cxx:1390
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:1180
WpADOColumns get_Columns() const
Definition: Awrapado.cxx:1229
void put_Type(const KeyTypeEnum &_eNum)
Definition: Awrapado.cxx:1115
void put_DeleteRule(const RuleEnum &_eNum)
Definition: Awrapado.cxx:1144
RuleEnum get_DeleteRule() const
Definition: Awrapado.cxx:1136
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:1100
WpADOColumns get_Columns() const
Definition: Awrapado.cxx:1164
KeyTypeEnum get_Type() const
Definition: Awrapado.cxx:1107
void put_UpdateRule(const RuleEnum &_eNum)
Definition: Awrapado.cxx:1158
OUString get_RelatedTable() const
Definition: Awrapado.cxx:1121
RuleEnum get_UpdateRule() const
Definition: Awrapado.cxx:1150
OUString get_Name() const
Definition: Awrapado.cxx:1092
void put_RelatedTable(std::u16string_view _rName)
Definition: Awrapado.cxx:1129
bool PutValue(const OLEVariant &aVariant)
Definition: Awrapado.cxx:962
sal_Int32 GetAttributes() const
Definition: Awrapado.cxx:916
DataTypeEnum GetADOType() const
Definition: Awrapado.cxx:902
bool put_Size(sal_Int32 _nSize)
Definition: Awrapado.cxx:972
void put_Type(const DataTypeEnum &_eType)
Definition: Awrapado.cxx:910
sal_Int32 GetPrecision() const
Definition: Awrapado.cxx:924
bool AppendChunk(const OLEVariant &aVariant)
Definition: Awrapado.cxx:967
sal_Int32 GetNumericScale() const
Definition: Awrapado.cxx:932
ParameterDirectionEnum get_Direction() const
Definition: Awrapado.cxx:940
bool PutAttributes(sal_Int32 _nDefSize)
Definition: Awrapado.cxx:646
sal_Int32 GetAttributes() const
Definition: Awrapado.cxx:638
OLEVariant GetValue() const
Definition: Awrapado.cxx:601
DataTypeEnum GetADOType() const
Definition: Awrapado.cxx:630
bool PutValue(const OLEVariant &aValVar)
Definition: Awrapado.cxx:616
bool Delete(AffectEnum eNum)
Definition: Awrapado.cxx:796
bool Supports(CursorOptionEnum CursorOptions)
Definition: Awrapado.cxx:708
bool get_CacheSize(sal_Int32 &_nRet) const
Definition: Awrapado.cxx:876
bool AddNew(const OLEVariant &FieldList, const OLEVariant &Values)
Definition: Awrapado.cxx:802
bool put_MaxRecords(ADO_LONGPTR _nRet)
Definition: Awrapado.cxx:846
bool put_CacheSize(sal_Int32 _nRet)
Definition: Awrapado.cxx:882
bool put_CursorType(CursorTypeEnum _nRet)
Definition: Awrapado.cxx:858
bool Move(sal_Int32 nRows, VARIANT aBmk)
Definition: Awrapado.cxx:774
bool UpdateBatch(AffectEnum AffectRecords)
Definition: Awrapado.cxx:888
CompareEnum CompareBookmarks(const OLEVariant &left, const OLEVariant &right)
Definition: Awrapado.cxx:750
bool Open(VARIANT Source, VARIANT ActiveConnection, CursorTypeEnum CursorType, LockTypeEnum LockType, sal_Int32 Options)
Definition: Awrapado.cxx:668
void PutRefDataSource(IUnknown *pIUnknown)
Definition: Awrapado.cxx:730
bool put_LockType(LockTypeEnum _nRet)
Definition: Awrapado.cxx:870
bool SetBookmark(const OLEVariant &pSafeAr)
Definition: Awrapado.cxx:758
WpADOProperties get_Properties() const
Definition: Awrapado.cxx:820
bool get_CursorType(CursorTypeEnum &_nRet) const
Definition: Awrapado.cxx:852
WpADOFields GetFields() const
Definition: Awrapado.cxx:765
bool Update(const OLEVariant &FieldList, const OLEVariant &Values)
Definition: Awrapado.cxx:808
bool get_LockType(LockTypeEnum &_nRet) const
Definition: Awrapado.cxx:864
bool NextRecordset(OLEVariant &RecordsAffected, ADORecordset **ppiRset)
Definition: Awrapado.cxx:828
void GetDataSource(IUnknown **pIUnknown) const
Definition: Awrapado.cxx:724
PositionEnum_Param get_AbsolutePosition()
Definition: Awrapado.cxx:716
bool get_MaxRecords(ADO_LONGPTR &_nRet) const
Definition: Awrapado.cxx:840
bool get_RecordCount(ADO_LONGPTR &_nRet) const
Definition: Awrapado.cxx:834
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:1291
WpADOKeys get_Keys() const
Definition: Awrapado.cxx:1322
WpADOProperties get_Properties() const
Definition: Awrapado.cxx:1338
WpADOCatalog get_ParentCatalog() const
Definition: Awrapado.cxx:1330
WpADOIndexes get_Indexes() const
Definition: Awrapado.cxx:1314
void putref_ParentCatalog(_ADOCatalog __RPC_FAR *ppvObject)
Definition: Awrapado.cxx:1985
WpADOColumns get_Columns() const
Definition: Awrapado.cxx:1306
bool ChangePassword(std::u16string_view _rPwd, std::u16string_view _rNewPwd)
Definition: Awrapado.cxx:1421
OUString get_Name() const
Definition: Awrapado.cxx:1408
bool SetPermissions(const OLEVariant &Name, ObjectTypeEnum ObjectType, ActionEnum Action, RightsEnum Rights)
Definition: Awrapado.cxx:1447
RightsEnum GetPermissions(const OLEVariant &Name, ObjectTypeEnum ObjectType)
Definition: Awrapado.cxx:1436
void put_Name(std::u16string_view _rName)
Definition: Awrapado.cxx:1415
void put_Command(OLEVariant const &_rVar)
Definition: Awrapado.cxx:1360
void get_Command(OLEVariant &_rVar) const
Definition: Awrapado.cxx:1354
OUString get_Name() const
Definition: Awrapado.cxx:1346
sal::systools::COMReference< _ADOCatalog > pInterface
Definition: Aolewrap.hxx:44
WrapT GetItem(sal_Int32 index) const
Definition: Aolewrap.hxx:102
OString right
float u
sal_Int32 nState
DocumentType eType
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
@ table
Type
static ColumnProperty ** pFields
css::uno::Reference< css::beans::XPropertySet > ObjectType
Definition: VCollection.hxx:59
Value
int i
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
Length
#define VT_VARIANT
LONG
return hr
OUString Name
unsigned char sal_uInt8
signed char sal_Int8
CursorType
sal_uInt64 left
const SvXMLTokenMapEntry aTypes[]