paulo_piri
29th November 2004, 19:25
Hello,
I am completely confused with Interfaces. :confused:
i need make VB Application to access to the BaaN client, and i need to know which the difference between OLE Interface and AFS.
Anybody knows how to solve my problem?
Thank you
Regards,
Paulo_piri
mark_h
29th November 2004, 19:50
Well I can tell you what I think the difference is.
(1) Typically the OLE interface is another way for the client to access Baan. This can be done several ways. First through direct access to the tables using Baan SQL. I have used this to retrieve data from Baan and populate spreadsheets - nothing formal or in production. Second you can make calls to Baan DLL's or libraries to retrieve data or to update data. I have tried this by calling two different libraries - one to retrieve data and one to do API function server to update data. The third way you can use OLE is to actually write API calls in VB and execute the sessions in the Background. Again I tested this but never really used it.
(2) Application Function Servers come in two types - DDC and API. In both cases these are typically written in Baan - using standard Baan development sessions. I do not know anything about DDC, but I have seen it used to update data based on Baan session logic. I have been told it is best to own source to use this method. Again I have never tried it. API (Application Program Interface) is typically used to load data from an outside source into Baan by running the appropriate Baan session in the background by issuing stpapi commands.
My personal preference is to use API type function servers to perform certain transactions. For example - to do massive inventory transfers I have a session to run the Inventory transfer session in the back ground performing the Bin-to-Bins. We also use other Baan sessions to determine what inventory needs to be manually transferred between projects, it then calls a library to perform the manual transfer. We have also used the method to automate receiving, storing and issuing material. I have never seen any documentation on OLE, but examples are usually provided on the Baan Client. The start of this form has a sticky thread with documentation on the API type function servers. I believe there is documentation on DDC function servers, but I no longer have a copy of it.
More information on what you are requirements are may generate other suggestions or recommendations.
Good Luck!
Mark
paulo_piri
29th November 2004, 20:41
thank you for the fast reply.
I understand your post.
I only have a small doubt, that is, in (1) when you said "Second you can make calls to Baan DLL's or libraries to retrieve data or to update data", i have to devellop the DLL's and libraries? or they already exist?
for create the API i use Application Function Servers? is that true!?
to write API calls in VB and execute the sessions in the Background, you know where I can download some example?
sorry, my ignorance!!!.... but i am a starter in BAAN.
THANK YOU
mark_h
29th November 2004, 21:35
Depending on what you are doing they may already exist. I believe in most specific cases you will have to write your own DLL's. I have always developed my own since we do not own source.
I am not sure I understand this question "for create the API i use Application Function Servers? is that true!?". If you are talking about creating a API function server then you do not have to do this in Baan. I believe you can search this forum for OLE and API and probably find an example. I know there was one post on this in regards to printing order documents(tisfc0408m000).
Mark
paulo_piri
30th November 2004, 17:43
Mark_h,
i read a lot of post's, and now i need to think about baan e vb!!! ;)
it is thus:
1) with stpapi and VB, i can use AFS? true!?! AFS are session developed for us or not. But the problem is that i never had used BAAN.
i need create new stock entries. I think the best way is to call the session baan to do that, is that possible? or i need develop one AFS for this?
2) it is possible call more than one session at the same time?
3) another solution is through DLL's? i need ttstpcreatdll to create DLL's? i need know BAAN?
4) can you explain what it is a BWC File?
one more time sorry my ignorance about BAAN. :rolleyes:
THANK YOU
mark_h
30th November 2004, 19:42
(1) Yes it is true you can use the API function servers with VB. See the example that King Willy posted for you. Yes - you can add new stock items with VB calling the Baan session for this. The example already posted should show you how to call the Baan session and how to process data through the session. Before writing the code become familiar with the baan session - what inputs is mandatory, how it reacts to data, etc. This is key piece in writing one of the API type function servers. You may also want to download and read the sticky post at the beginning of this forum.
(2) Yes - you can call more than one session in the function server. You have control over the sessions in the back ground. I typically call one session, process the data, end the session, and then call the next session.
(3) Yes - you would need to know baan programming if you create DLL's. ttstpcreatdll will only create a library with the stpapi calls available for the session. It does not actually create a function server. If you are using VB then I would not bother with ttstpcreatdll. I no longer use it. If you are using DLL's then yes you should know Baan coding.
(4) A bwc is a baan windows client configuration file - at our site the default file is called default.bwc. These are usually found under the client baan install directory - at our site this is C:\Program Files\Baan\lib\user.
Mark
paulo_piri
30th November 2004, 20:13
THANK YOU.....
my last doubt is, what is a difference between API function servers and AFS?
THANK YOU.....
paulo_piri
mark_h
30th November 2004, 20:19
In my mind they are the same thing. Some people refer to "function servers" and mean DDC type function servers. AFS(Application Function Servers) uses API (application programming interface) functions to interface with the session. These functions all start with "stpapi". To me AFS and API mean the same thing - an application function server which uses the API commands to interact with a Baan session.
Mark
paulo_piri
30th November 2004, 20:30
mark_h
THANK YOU FOR ALL REPLIES....
Paulo_piri