cancel
Showing results for 
Search instead for 
Did you mean: 

Transactions and C# with UDO (user defined objects) - DLL

Former Member
0 Kudos

Hi,

we are developing in C# and ran in some questions exploring the features of the UDO:

(1) Does there exist a SDK-version which supports building the DLL with C# or is there only the C++-version available?

Will that change or are we forced to use C++ if we want to develop a UDO-DLL?

(2) Is it possible from within the DLL to access other UD-tables via their UDO?

I do not mean the child-tables of a UDO, which can be accessed via the CSboDataAccessGate available with GetDAG().

We would like to access another UDO and thus its tables.

(2.1) If it is possible, will executed transaction stay within the transaction context of the transaction which called the DLL?

Ch. Becker

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

Hi,

Re (1)

There's only a C++ version available currently and at least some time ago it was not planned to ship any other version, but I will double-check whether or not this has changed.

I think you could nevertheless just write a wrapper for the C++ interface and call a C# DLL from there; but again currently you cannot get around one layer of C++...

Re (2)

Yes. I did not check it out in detail, but it is possible in general.

Re (2.1)

I am not sure about this; I will check it.

Regards,

Frank

Former Member
0 Kudos

(2) I think this would be either

CSboDataAccessGate CSboBusinessObject::GetDAG (const wchar_t *objectId, ArrayOffset ao = ao_Main);

with

GetDAG("UDOXYZ", ao_Main) (rather then GetDAG("206", ao_Main) ???)

to gain access to the tables of another UDO

or

CSboBusinessObject CSboBusinessObject::*CreateBusinessObject (const wchar_t *id);

with

CreateBusinessObject("UDOXYZ")

where you can request creation of another (user defined) business object? Would that work?

ATM I do not have the environment to test this.

Ch. Becker

former_member185703
Active Contributor
0 Kudos

(2) You cannot (asfaik) directly get the DAG; the second attempt works except that * must be placed before CSboBusinessObject (but the compiler would have told you...;-)):

>CSboBusinessObject *CSboBusinessObject::CreateBusinessObject (const wchar_t *id);

>with

>CreateBusinessObject("UDOXYZ")

Then you can e.g. get the DAG for this object...

Regards

Frank

Answers (0)