Link to home
Start Free TrialLog in
Avatar of nayakga
nayakga

asked on

Passing Dataset from a Com Object to client

Hi,
 I need to pass a dataset (Tdataset) that I have created in a COM object as  shown below

function TMessageBoard.getCustomerList: OleVariant;
var
  dbconn1 : Tdatabase;
  custData : TStoredProc;
  myxml : conxml ;
  rstr : String;
begin

     custData := omnidm.OmniConn;

    custData :=  TStoredProc.Create(nil)  ;
    custData .DatabaseName := dbconn1 .DatabaseName;
    custData .StoredProcName :=   'sp_getCustomerList';
    custData .Prepare;
    custData .Open;

   
    Result := myproc1;

end;

I get a type mismatch error .

Is it possible to pass Datasets ,if so What should be the return datatype ?

I am using delphi 6.0. currently I am passing data as Variant Arrays .

Regards
Ganesh
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zencovich
Zencovich

Try use TADOCOnnection/TADODataSet instead and pass
TADOConnection._Connection and TADODataSet._RecordSet property values.
In host/client application you may set this properties to your own TADODataSet and get access to COM's dataset.

In DCOM configuration you may need set RDSConnection too.

nayakga:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
https://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: Lee_Nover

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer