Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by ��len TOZKOPARAN
Wed, 12 Apr 2000 00:00
TRemoteServer->AppServer
Author: ��len TOZKOPARAN
Date: Wed, 12 Apr 2000 00:00
Date: Wed, 12 Apr 2000 00:00
17 lines
1017 bytes
1017 bytes
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
Re: TRemoteServer->AppServer
Author: 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
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads