.NET Enum

rhnavcrhnavc Member Posts: 11
Hi,

I have to integrate the Recordset.Open method into NAV2016. The problem is that the Open method contains 5 input parameters from which 2 of type .NET Enum.

I defined the following variables:
RecordsetNet DotNet ADODB.RecordsetClass.'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
CursorTypeEnumX DotNet ADODB.CursorTypeEnum.'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
LockTypeEnumX DotNet ADODB.LockTypeEnum.'ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'


and added the following code:
RecordsetNet := RecordsetNet.RecordsetClass;
CursorTypeEnumX := CursorTypeEnumX.adOpenDynamic();
LockTypeEnumX := LockTypeEnumX.adLockBatchOptimistic();

RecordsetNet.Open(
CommandNet,
ConnectionNet,
CursorTypeEnumX,
LockTypeEnumX,
-1
)


When I run the code I get the following error at CursorTypeEnumX level:
Cannot load an instance of the following .NET Framework object: assembly ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.

I simply don't know how to instantiate the "Enum" variables, or is it something else? I would appreciate any help. Thanks.

Answers

Sign In or Register to comment.