🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

ADOMD: Congratulations !!!!!!!!!

#4149
From: Sorokoletov Gregory
Date: Thu, 28 Mar 2002 11:20
226 lines
7459 bytes
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: <3ca2fc72_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3ca052df$1_2@dnews> <3ca193c5_2@dnews> <3ca1cc2d_1@dnews> <3ca2d87e_1@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 03:23:17 PST
From: "Sorokoletov Gregory" <gsorokoletov@sovintel.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3ca052df$1_2@dnews> <3ca193c5_2@dnews> <3ca1cc2d_1@dnews> <3ca2d87e_1@dnews>
Subject: ADOMD: Congratulations !!!!!!!!!
Date: Thu, 28 Mar 2002 14:20:17 +0300
Lines: 229
Organization: Sovintel
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: 212.44.130.15
Message-ID: <3ca2fc72_2@dnews>
X-Trace: dnews 1017314418 212.44.130.15 (28 Mar 2002 03:20:18 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!news.stealth.net!news.stealth.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews