Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a recordset back from C)M+

Status
Not open for further replies.

MonkeyK

Programmer
Sep 25, 2002
3
US
I am trying to return a recordset from an object in COM+ to my Powerbuilder 7 app. I get the recordset back OK, but whenever I try to use createfrom to populate a datastore, I get a -5 return code.
I tried looking up how it should be done in the online books, and I think that I have it right:

string ls_mts,ls_return_msg
long ll_rc
ADOResultset lrs_results
OLEObject loo_testrs,loo_hparate
datastore lds_ds
integer li_rc

//Connect to Object
loo_hparate = CREATE OLEObject
ll_rc = loo_hparate.ConnectToNewObject("TestObject.TestClass")

loo_testrs = loo_hparate.testmethod("parm1", "parm2")

lrs_results = CREATE ADOResultset
lrs_results.SetRecordSet(loo_testrs)
lds_ds = create u_cstm_ds
li_rc = lds_ds.CreateFrom(lrs_results)

DESTROY loo_hparate
DESTROY loo_test

RETURN 0

Can anyone tell me what I am doing wrong?

Thanks,
Mike
 
Robert,
Sorry, but I do not have a good answer. The error appears to be with Powerbuilder. They mentioned it in the knowledge base for version 6, but it does not seem to have been corrected up to now. We worked around the problem by choosing to return an XML like format for our data.


-Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top