khadarBaaNBoard
2nd March 2006, 15:02
Hi,
We are using BaaNIVc4.
we are successfull in testing the AFS for maintain and release production orders steps.
Our Production Control System gives data in text file and we want to store them in one temporary table in BaaN without the user interaction. (i.e.,Whenever the file is send by PLC system the table in BaaN has to be updated). Please can any one suggest how to do this.
Using AFS from this table we can create a session which can run the the BaaN Sessions using AFS. This part is clear.
Thanks in Advance,
Abdul Khadar
s.khadar@arasco.com
mark_h
2nd March 2006, 16:05
Just write a session that puts the file into the temp table. Then put this program and the AFS program into a job. You can run it once a day or every 5 minutes if you want. The AFS program can check the temp table, if it finds records process them(and archive into another table), if no records then it just ends. Just a suggestion!
khadarBaaNBoard
4th March 2006, 07:41
Thanks for suggestion. This option we have it for now. However, I want to update the table in BaaN using the trigger generated by VB or C#. Since the time of file is not known and the on line inventory is required, I am searching for this option. Is there any way to update the data directly to MSSQL data base?
Regards,
Abdul Khadar
Troy M
7th March 2006, 16:21
Hi Abdul,
We use Mark's method where I work as well (scheduling Baan to check for import files). Here are three reasons we've found for not writing directly into the underlying database:
1. Baan don't support it, so if something goes wrong there's no help
2. It bypasses internal business logic in Baan. Entering data through a session may cause Baan to post the information into other sessions as part of the "save" process. If you write directly to the database, these functions won't be called.
3. Baan creates its own hash values in the underlying tables, along with the data you would need to insert. These are custom indexes and row-counters apparently - we assume it's a way for the Baan code to remain database neutral. Without knowing how to calculate these values, it's not possible to fully recreate a data row in the database.
Because of this we're using "almost real-time" imports by regularly scheduling the import process from within Baan.
Troy
khadarBaaNBoard
8th March 2006, 15:41
Thanks for the replies. I am trying various options, I will post the result soon.
Regards,
Abdul Khadar
khadarBaaNBoard
23rd March 2006, 09:53
We have succeeded in reading a text file and inserting the records using seq functions. This is working fine.
Many thanks to the members.
Abdul Khadar