🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4148

Re: ADOMD: How to retrieve "CudeDef" object from "CubeDefs" collection?

#4148
From: Vassiliev V.V.
Date: Thu, 28 Mar 2002 08:40
111 lines
5952 bytes
�������������. � ������ ��� ���������, ��� ������������ 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: <3ca2d87e_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!hub1.nntpserver.com!xmission!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-hub.siol.net!zur.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3ca052df$1_2@dnews> <3ca193c5_2@dnews> <3ca1cc2d_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: UKRAINIAN,KOI8R
X-Google-Thread: 10698b,c870f68434c1f204
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-03-28 00:59:05 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>
Subject: Re: ADOMD: How to retrieve "CudeDef" object from "CubeDefs" collection?
Date: Thu, 28 Mar 2002 11:40:04 +0300
Lines: 115
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.139.131
Message-ID: <3ca2d87e_1@dnews>
X-Trace: dnews 1017305214 62.118.139.131 (28 Mar 2002 00:46:54 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!hub1.nntpserver.com!xmission!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-hub.siol.net!zur.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews