Article View: borland.public.cppbuilder.database.ado
Article #4151Re: ADOMD: Congratulations !!!!!!!!!
From: Vassiliev V.V.
Date: Thu, 28 Mar 2002 15:20
Date: Thu, 28 Mar 2002 15:20
247 lines
8235 bytes
8235 bytes
If I am not wrong there are also a lot of Ghost methods in other interfaces
in this library.
Regards,
Vassiliev V.V.
http://www.oledbdirect.com
"Sorokoletov Gregory" <gsorokoletov@sovintel.net> �������/�������� �
�������� ���������: news:3ca2fc72_2@dnews...
> Hi Vasiliy!
>
>
>
> My Congratulations!!!!
>
>
>
> After deleting ALL GhostMethod_: functions from ADOMD_TLB.h in following
> objects:
>
> interface CubeDefs;
>
> interface CubeDef;
>
> class CubeDefsDispT;
>
> class CubeDefDispT;
>
>
>
> program works fine!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
>
>
> It work correctly:
>
> CubeDefs *CubeDefs1= Catalog1->CubeDefs;
>
> CubeDef *CubeDef1;
>
>
>
> :
>
> for(I= 0; I < CubeDefs1->Count; I++)
>
>
>
> IDispatch *disp= NULL;
>
> disp= Catalog1->CubeDefs->get_Item(I);
>
> disp->QueryInterface(IID_CubeDef, (void**)&CubeDef1);
>
> disp->Release();
>
>
>
> TreeView1->Items->AddChild(RootNode, CubeDef1->Name);
>
> }
>
>
>
> It also works correctly:
>
> CubeDefs *CubeDefs1= Catalog1->CubeDefs;
>
> CubeDef *CubeDef1;
>
>
>
> for(I= 0; I < CubeDefs1->Count; I++)
>
> {
>
> CubeDef1= CubeDefs1->get_Item(I);
>
> TreeView1->Items->AddChild(RootNode, CubeDef1->Name);
>
> }
>
>
>
> The TCOMICellset works fine!
>
>
>
> ���!!! �������!!!
>
> [C ������� � MDAC � �����������...]
>
>
>
> PS:
>
> Your OLEDB Direct component is cool (but unfortunately works only 15 days
> (Trial version).
>
> It is not enough).
>
> You are very good programmer.
>
>
>
> Thanks a lot!
>
>
>
>
>
> "Vassiliev V.V." <vv_vas@iname.com> wrote in message
> news:3ca2d87e_1@dnews...
> > �������������. � ������ ��� ���������, ��� ������������
ImportTypeLibrary
> �
> > BCB (������ � ������� �� ��, ��� ������������� � Delphi).
> >
> > ����������� CubeDefs �� ADOMB_TLB.h
> >
> > interface CubeDefs : public Adomd_tlb::MD_Collection
> > {
> > public:
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_0_0(void) = 0;
//
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_4_1(void) = 0;
//
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_8_2(void) = 0;
//
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_12_3(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_16_4(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_20_5(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_24_6(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_28_7(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_32_8(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE GhostMethod_CubeDefs_36_9(void) = 0;
> //
> > [-1]
> > virtual HRESULT STDMETHODCALLTYPE get_Item(TVariantInParam
> Index/*[in]*/,
> > Adomd_tlb::CubeDefPtr*
> > ppvObject/*[out,retval]*/) = 0; // [0]
> > ...
> > };
> >
> > � ��� ��� ��������� � adomd.h
> >
> > MIDL_INTERFACE("2281375D-8BD3-11D0-B4EF-00A0C9138CA4")
> > CubeDefs : public MD_Collection
> > {
> > public:
> > virtual /* [helpcontext][id][propget] */ HRESULT
STDMETHODCALLTYPE
> > get_Item(
> > /* [in] */ VARIANT Index,
> > /* [retval][out] */ CubeDef __RPC_FAR *__RPC_FAR *ppvObject)
=
> > 0;
> >
> > };
> >
> > �.�. ��� ������ get_Item ���������� �� ������ ������� ����������, ���
> ������
> > ����, � 11-��.
> >
> > � ���� ������ ��� OLAP, �� ����� ��������� - ���� ������������ adomd.h,
> ����
> > ������������� ���������� � Delphi � ����������� ��������������� � Delphi
> > ADOMD_TLB.pas (��� .hpp ��������������). ����� ����� ����������� �������
> ���
> > GhostMethod_XXX - �� ������ � CubeDefs, �� � �� ���� ��������� �������.
> > ������, ��������� ������ adomd.h ��������� � MDAC SDK
> > (http://www.microsoft.com/data).
> >
> > � ���������,
> > �������� �.�.
> > http://www.oledbdirect.com
> >
> > P.S. ������ � ADO MD 2.7 ���� �� �����, ���� ��� �������� � Delphi.
> >
> > "Sorokoletov Gregory" <gsorokoletov@sovintel.net> �������/�������� �
> > �������� ���������: news:3ca1cc2d_1@dnews...
> > > Hi Vasiliy!
> > > Thank you for your help, but your code do not work properly, it also
> > > generates a error :(
> > > IDispatch *disp= NULL;
> > > disp= Catalog1->CubeDefs->get_Item(1); // <- here will be error!!
> > > disp->QueryInterface(IID_CubeDef, (void**)&CubeDef1);
> > > disp->Release();
> > >
> > > Even we wrote jast follows, error will be denetaded inevitably!!! (�
> > ���!!)
> > > CubeDefs1->get_Item(I); // !!!!! HERE also WILL GENETETE ERROR;
> > > In "ADO_TLB.H" source file:
> > > Adomd_tlb::CubeDefPtr __fastcall get_Item(TVariantInParam
Index/*[in]*/)
> > > {
> > > //Adomd_tlb::CubeDefPtr ppvObject;
> > > Adomd_tlb::CubeDef25Ptr ppvObject;
> > > OLECHECK(this->get_Item(Index, (Adomd_tlb::CubeDefPtr*)&ppvObject));
//
> <-
> > > HERE WILL BE ERROR
> > > return ppvObject;
> > > }
> > >
> > > PS:
> > > In my programs I use MDAC 2.7 (2.70.7713.0).
> > > May be error in ADO MD dll?
> > > Thanks
> > >
> > >
> > >
> > > "Vassiliev V.V." <vv_vas@iname.com> wrote in message
> > > news:<3ca193c5_2@dnews>...
> > > > ���� �� �����, Catalog1->CubeDefs->get_Item(I) ���������� CubeDef25.
�
> > > > ��������, ����� �������� ��������� �� IDispatch (��� IUnknown), � ��
> > ����
> > > > QueryInterface �� CubeDef - ��� � ������ �������� as �
> > > Catalog1.CubeDefs[I]
> > > > as CubeDef.
> > > >
> > > > IDispatch * disp = NULL;
> > > > disp = Catalog1->CubeDefs->get_Item(I);
> > > > disp->QueryInterface(IID_CubeDef, (void**)&CubeDef1);
> > > > disp->Release();
> > > >
> > > > �������� �.�.
>
>
>
Technical Details
Message-ID:
<3ca3357a_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3ca052df$1_2@dnews> <3ca193c5_2@dnews> <3ca1cc2d_1@dnews> <3ca2d87e_1@dnews> <3ca2fc72_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,c870f68434c1f204 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-03-28 07:27:23 PST From: "Vassiliev V.V." <vv_vas@iname.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3ca052df$1_2@dnews> <3ca193c5_2@dnews> <3ca1cc2d_1@dnews> <3ca2d87e_1@dnews> <3ca2fc72_2@dnews> Subject: Re: ADOMD: Congratulations !!!!!!!!! Date: Thu, 28 Mar 2002 18:20:49 +0300 Lines: 249 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 62.118.135.112 Message-ID: <3ca3357a_2@dnews> X-Trace: dnews 1017329018 62.118.135.112 (28 Mar 2002 07:23:38 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews