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
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