Go Back > Blogs > dberg72's blog

User login

Frontpage Sponsor


As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
Handover everything to System Integrator from drawing BP till implementation of ERP
Hire more inhouse skilled & capable IT Resource to work directly with SI
Rely on SI Architects/Consultants
Total votes: 6

Baanboard at LinkedIn

Reference Content

How to perform Baan Automation together with BOI data
By dberg72 at 18 Sep 2015 - 14:41



For years we are working with the BOI's used with BCK 1.3 software, Create COM objects, register them on the server, etc. All working fine.
We have build on this technology an extranet, together with web services.

Now we want to stop using the Java Client and BOI COM dll's on the Windows server side (32 bits, registry setting) and go on with the Baan Automation (Baan Client on the server).
I saw some samples of Baan Automation, which are working fine, even with return variables in reference calls.

We can build off course our own library, and then return a separated string, containing the records, but most of the logic is already there in our BOI's.
So  we still want to use the exisiting BOI libraries (baan side) to retrieve, update and delete the data. Therefore I call the class through ASP.NET by:


'Sample code
BaanObj = Server.CreateObject("Baan4.Application.default")
BaanObj.Timeout = 30

'Predefined variables:
ccur.f.Text = "USD"
ccur.t.Text = "USD"
StructCurrency = 0 'Reference variable to the BaanObj call
StructError = 0  'Reference variable to the BaanObj call
ReqdFields = ""
CallId = 0
SetSize  = 1000
SetComplete = "N"
Company As Integer = 100

BaanDLL = "occmcscurrrates"
baanFunction = "ccmcscurrrates.list(" & Chr(34) & ccur.f.Text & Chr(34) & ", " & Chr(34) & ccur.t.Text & Chr(34) & "," & StructCurrency & "," & Chr(34) & ReqdFields & Chr(34) & "," & SetSize & "," & CallID & "," & Chr(34) & SetComplete & Chr(34) & "," & Company & "," & StructError & ")"
BaanObj.ParseExecFunction(BaanDLL, BaanFunction)
If BaanObj.Error = 0 Then
 'BaanObj.FunctionCall contains:

--- more code to retrieve the integer values from this string


'StructCustomer's value is changed to 435488
'StructError's value is changed to 369856


BOI's are working with Containers in BaaN. The containers are represented by an integer (in StructCurrency and StructError).
The reference variables are indeed returned by the baan call, but what I really want is the underlying container data.
In the old way, this was retrieved through the ccmcscurrrates.dll in ASP.NET and then retrieve the records in the ASP.NET code.
Probably somewhere the records are retrieved in this DLL by receiving back an integer value from the BOI.




Is there a way to retrieve what I want?


Thanks in advance.



Average: 4 (1 vote)

by dberg72 on September 24, 2015 - 11:09am
I have probably found a solution.

The containers seems still be there after you return in the .NET code.
A new function on the baan side with a reference of the container from .NET can read out the container. If you parameterize it with an index parameter, you are able to read out the complete container record by record and return it to .NET code.

Also the 4K string limit is solved with this.

by bhushanchanda on September 24, 2015 - 6:31pm
bhushanchanda's picture
Thanks for posting the solution.

Also note that you should not create blogs for your questions. Creating threads in related forums might get responses.

Moving it to right forum.

by dberg72 on September 25, 2015 - 7:58am
Thank you. I wasn't aware about the blogging issue.

All times are GMT +2. The time now is 04:27.

©2001-2018 - -