Article View: borland.public.cppbuilder.database.multi-tier
Article #1122Re: TRemoteServer->AppServer
From: Michael
Date: Tue, 02 May 2000 00:00
Date: Tue, 02 May 2000 00:00
51 lines
2097 bytes
2097 bytes
I have made just what you are talking about. Here is a snip of my
code.
I have made a method on the com interface that is called QuerySet.
This will set the SQL area of a TQuery component
try
{
DCOMConnection->Connected = true;
}
catch(...)
{
ShowMessage("Unable to Connect to the Remote Server!");
ClientDataSet->Active = false;
DCOMConnection->Connected = false;
return;
}
IDispatch* disp = (IDispatch*)(DCOMConnection->AppServer);
IMyObjectDisp MyObject((IMyObject*)disp);
String SQL = "SELECT * from WhatEver";
MyObject.QuerySet(WideString(SQL).Detach());
ClientDataSet->Active = true;
After I set the SQL in the TQuery Component I then Activate the
ClientDataSet.
Hope this helps.
On Wed, 12 Apr 2000 10:56:12 +0300, "οΏ½οΏ½len TOZKOPARAN"
<solen@mda.com.tr> wrote:
>Hello,
>I am trying to access the COM object implemented by the remote data module.
>Borland Help
>says that
> AppServer property of the TRemoteServer returns the interface pointer and
>gives an example.
>
>IMyObjectDisp AnObject(LPDISPATCH(MyRemoteServer->AppServer));
>
>AnObject->DoSomething();
>
>However this coude does not even compile. I tried to cast it to the
>IMyObject and the call DoSomething however
>I get an Access Violation..
>Does anybody has a sample code that works correctly.
>
>Thanks
>
>
Technical Details
Message-ID:
<39112f00.681537068@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8d19ra$bbr3@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fcd2b,3bfc75d1c00b72f0 X-Google-Attributes: gidfcd2b,public From: mjcrapo@spectek.com (Michael) Subject: Re: TRemoteServer->AppServer Date: 2000/05/02 Message-ID: <39112f00.681537068@newsgroups.borland.com> X-Deja-AN: 618391778 Content-Transfer-Encoding: 8bit References: <8d19ra$bbr3@bornews.borland.com> Content-Type: text/plain; charset=ISO-8859-1 X-Trace: 2 May 2000 12:30:01 -0800, 127.0.0.1 MIME-Version: 1.0 Reply-To: mjcrapo@spectek.com Newsgroups: borland.public.cppbuilder.database.multi-tier