vinceco252
10th May 2002, 18:38
I have some really basic, and possibly stupid, questions, so please bear with me.

My environment is NT 4.0, SQL Server 7, and Baan IVc3.

I am designing a VB based shop floor control program to integrate to a Baan Distribution customization that designed at our original implementation. I have full access to all of the code involved in the customization, but no standard Baan source code. Baan will no longer distribute BCK, and purchasing OpenWorld is not an option.

So, my questions are:

How does an AFS work with non-Baan programming?

To utiliize Baan's OLE interface, does a session have to have an AFS?

If not, how does the OLE interface work? I have tried several of the samples in this forum, and I cannot get them to work right. Does anyone have a sample of using OLE/VB to insert an item into ttiitm001100 or a sales/ purchase order header? A sample like that would be really helpful.

Also, please comment on anything I don't seem to understand from reading my post. Also, any general comments on VB to Baan integration would be appreciated. Thank you all ahead of time for your help.

Vince

mark_h
10th May 2002, 20:18
Hello Vince!

To use OLE you do not have to use a session. You can query and update tables. I have done a vew queries, but I have not updated any tables. So you do not have to use the AFS functionality.

BUT I recommend using AFS type function servers, UNLESS you know all tables that need to be updated. So for example on tiitm001 if you update it then there maybe some supporting tables that you also need to update. Since I do not know these type of things, I almost always use AFS type function servers. This way the session updates all the appropriate tables. Our conversion to Baan was done using function servers and I must admit(at least at my site) it was very successful(Thanks to Gordon Fasbender and his AFS routines).

Sorry I do not have any update samples and for the function server piece it appears you have already tried some of the other posts. It seems to me that all the others eventually had their code working. Maybe in another post you could attach some of your code and what the problem is. Then one of the real gurus(not me) could help you.

Good Luck!

Mark

vinceco252
10th May 2002, 20:26
Thanks for the response Mark.

2 things:

I know the tables I am inserting/updating very well.

I think I am missing the part of AFS from where you create it with the create dll session to how you integrate that with an outside programming language. If anyone has any input on this, I would greatly appreciate it.

Thanks,

Vince

mark_h
10th May 2002, 21:40
Vince said:
I think I am missing the part of AFS from where you create it with the create dll session to how you integrate that with an outside programming language.

Not sure what you meant by this. Are you talking about ttstpcreatdll? You do not really need to use that if you use the stpapi commands directly.
Maybe we are not understanding each other?

Anyway I am going to attach some same VB code for calling a DLL that I developed. I did not clean up these scripts and this is not in production, but it does work. What I did was take a function server session and changed it to a dll. This DLL accepts the variables from excel, then calls the FS session. So in your case you could have a DLL for the update on which ever table(s) you are using.

Hope this helps!!!

Mark

vinceco252
10th May 2002, 23:01
Mark,

I think it is finally starting to sink through my skull. I appreciate your help and examples.

Thanks,

Vince

Dwallace
18th December 2002, 05:53
I too am trying to understand these functions....

? --> Does the ttstpoledaem have to be running for all this to work?

D

mark_h
19th December 2002, 04:23
I think when the connect is made to baan from VB it starts this daemon. I will have to check when I get to work tomorrow.

Mark

mark_h
20th December 2002, 22:33
The answer is yes - it should be running.

Mark

Dwallace
20th December 2002, 23:32
Thanks

cherokee
28th August 2013, 17:57
Hello Mark,

I am looking at your VB and put it in a macro(excel) but, obviously this VBS doesn't connect. What do I need at the Windows/BaaN side to this VB connects.

We have AIX IVc3.

Thanks and sorry if I am way too lost...

mark_h
28th August 2013, 21:38
You need the baan client. Then you need to load at the automation tab on the client under configure. Then the class name from the client is what you use to connect with in the code. When I originally posted this code the automation tab did not exist on the baan client.

mark_h
28th August 2013, 21:43
Now they usually look something like this:

On Error GoTo CannotCreateBaan

'run Baan Application
Set BaanObj = CreateObject("Baan4.Application.701")
ThisWorkbook.Sheets("PO").Activate
BaanObj.Timeout = 10
On Error GoTo BaanAutomationError

You should be able to find baan4.application.701 in the registry.

cherokee
30th August 2013, 14:40
Thanks worked.

hteixeira
6th May 2015, 19:35
I need to connect to ERP LN 7 the same way dll from Baan IV, but now in LN somebody know how?

Thanks,
Helena Teixeira

bhushanchanda
7th May 2015, 10:47
Hi,

Do not double post.

Similar thread (http://www.baanboard.com/baanboard/showthread.php?p=194465&posted=1#post194465)