deviceofmisery
7th December 2010, 03:52
Hello,

ich need to create a Baan4 access in VS2008 c#. I'm want to use ole to talk to Baan. But went I write:

Object baan4Obj = Activator.CreateInstance(Type.GetTypeFromProgID("Baan4.Application.baancn"));

I get an Interface from Baan to input mt password. If I enter it, the Error from Baan occures. Saying:
1. Recieved from ipc_boot: 'sh:/use/baancn/bse/bin/ipc_boot6.1 : not found'
2. Error : bw failed to connect to 10.192.26.5!bshell

Can somebody help me?

Secound thing:
I tried to use the library for this. So I included the bw.tbl library and Intelisence found the baan4class. But writing:

Baan4.Baan4Class baan = new Baan4Class();

is to less to start my baan account and i don't know how this should work!?

please help me!

anthony peiris
7th December 2010, 21:16
I beleive you have done tlbimp to create the dll
after that do this:
myBw.IDispatchBaan4 b = new myBw.Baan4();

deviceofmisery
8th December 2010, 03:27
What is "tlbimp" and do i need to do it? And if yes: How do i have to do it?

anthony peiris
8th December 2010, 17:38
tlbimp is a utility that creates a dll from type interface definition from .tlb file and it comes with .Net Framework SDK, or if you have microsoft Visual studio installed.. you can start with visual studio command prompt by typing tlbimp bw.tlb /out:myBW.dll

now you can use myBW.dll by adding reference to your project VB/C# etc.

myBW.IDispathcBaan4 b= new myBw.Baan4();
b.ParseExecFunction(.....)

deviceofmisery
9th December 2010, 03:06
thank you for your answer!
Right now I use the *.tlb file and it works. There is no need to use a *.dll file, it it?

Now i tried this:
Baan4.Baan4Class BaanIVObj;
BaanIVObj = new Baan4.Baan4Class();

BaanIVObj.ParseExecFunction("ottstpapihand", "stpapi.get.field(\"tipcs2101m000\", \"tipcs020.cprj\", BaanIVObj.ReturnValue)");

I don"t know what "ottstpapihand" is? And if I start is, the error is: "syntax error in function call".

deviceofmisery
13th December 2010, 03:53
anybody can help?