Board index » delphi » Calling IAppServer interface of Remote data Module in VB / VBScript or ASP

Calling IAppServer interface of Remote data Module in VB / VBScript or ASP

Hi,

I am working in a porting project. In this project, I have to call the MIDAS
Server component (Remote data Module) from Visual Basic. The methods that
are exposed by the IAppServer interface of Remote Data Module are:

1. Function AS_ApplyUpdates(ProviderName As String, Delta, MaxErrors As
Long, ErrorCount As Long, OwnerData)
    Member of Users_prj.Users_Rdm

2. Function AS_DataRequest(ProviderName As String, Data)
    Member of Users_prj.Users_Rdm

3. Sub AS_Execute(ProviderName As String, CommandText As String, Params,
OwnerData)
    Member of Users_prj.Users_Rdm

4. Function AS_GetParams(ProviderName As String, OwnerData)
    Member of Users_prj.Users_Rdm

5.Function AS_GetProviderNames()
    Member of Users_prj.Users_Rdm

6.Function AS_GetRecords(ProviderName As String, Count As Long, RecsOut As
Long, Options As Long, CommandText As String, Params, OwnerData)
    Member of Users_prj.Users_Rdm

7. Function AS_RowRequest(ProviderName As String, Row, RequestType As Long,
OwnerData)
    Member of Users_prj.Users_Rdm

I want to call these methods from Visual Basic. I am able to create an
instance of that component.  I am able to call the methods like AS_Execute
and do the manipulation in the database. But the AS_ApplyUpdates is not
working properly.

Have any one worked in calling IAppServer Interface from VB / VBScript?

But I don't have any example to call these methods without using
Clientdataset.

If you can help me in this regards, it will be great.

Thanks in advance.

Regards,
K.Baskar

 

Re:Calling IAppServer interface of Remote data Module in VB / VBScript or ASP


These MIDAS IAppServer methods are kinda "internal" and are not meant to be
used directly by the users. The most probable reason some of your AS_xxx
calls are not working is because you do not pass properly formatted data
packets into the parameters. And the data packet formatting is propreitary
to Borland and you normally don't need to mess with them. However, I suspect
that if you study the VCL code for TClientDataSet in detail and see how they
call the AS_xxx methods, you should be able to duplicate the process (I'm
not sure if this is legal with MIDAS licensing so I would check with
Borland).

have fun
--
Binh Ly
http://www.techvanguards.com

Quote
"K.Baskar" <siva_bas...@hotmail.com> wrote in message

news:92udmq$ii529@bornews.inprise.com...
Quote
> Hi,

> I am working in a porting project. In this project, I have to call the
MIDAS
> Server component (Remote data Module) from Visual Basic. The methods that
> are exposed by the IAppServer interface of Remote Data Module are:

> 1. Function AS_ApplyUpdates(ProviderName As String, Delta, MaxErrors As
> Long, ErrorCount As Long, OwnerData)
>     Member of Users_prj.Users_Rdm

> 2. Function AS_DataRequest(ProviderName As String, Data)
>     Member of Users_prj.Users_Rdm

> 3. Sub AS_Execute(ProviderName As String, CommandText As String, Params,
> OwnerData)
>     Member of Users_prj.Users_Rdm

> 4. Function AS_GetParams(ProviderName As String, OwnerData)
>     Member of Users_prj.Users_Rdm

> 5.Function AS_GetProviderNames()
>     Member of Users_prj.Users_Rdm

> 6.Function AS_GetRecords(ProviderName As String, Count As Long, RecsOut As
> Long, Options As Long, CommandText As String, Params, OwnerData)
>     Member of Users_prj.Users_Rdm

> 7. Function AS_RowRequest(ProviderName As String, Row, RequestType As
Long,
> OwnerData)
>     Member of Users_prj.Users_Rdm

> I want to call these methods from Visual Basic. I am able to create an
> instance of that component.  I am able to call the methods like AS_Execute
> and do the manipulation in the database. But the AS_ApplyUpdates is not
> working properly.

> Have any one worked in calling IAppServer Interface from VB / VBScript?

> But I don't have any example to call these methods without using
> Clientdataset.

> If you can help me in this regards, it will be great.

> Thanks in advance.

> Regards,
> K.Baskar

Re:Calling IAppServer interface of Remote data Module in VB / VBScript or ASP


Another alternative is to wrap the TClientDataSet component as a
COM object, pass it the IAppServer and provider name from your
VB program and expose the open, close, first, next, last methods
and so on. To access the field values, it is easy to implement a
COM object representing a field that is returned via a method
call.

You can then use this object to connect to the providers on any
RDM.

I use this approach whenever I nead to access RDMs from VBA e.g.
from Excel macros.

I have an example of this, drop me a mail if you are interested.

Regards,

Simon Lawrence

Other Threads