Baanboard.com

Go Back   Baanboard.com > Blogs > dberg72's blog

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
36%
Installation Wizard into new VRC
36%
Manual into existing VRC
7%
Manual into new VRC
22%
Total votes: 45

Baanboard at LinkedIn


Reference Content

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

Hi,

 

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:
 'ccmcscurrency.list("USD","USD",435488,"",1000,0,"Y",100,369856)

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

 

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

 

Question:

 

Is there a way to retrieve what I want?

 

Thanks in advance.

 

Dennis

4
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 14:17.


©2001-2017 - Baanboard.com - Baanforums.com