srinivas
20th December 2002, 07:18
Hello,
I am new to BaaN 5c and DAL.
I need a quick info.
How to acivate DAL and Where should I write DAL code for a table? Do I have to activate DAL table wise or for all tables?
Can I write DAL code for a standard table table?
Regards,
Paul P
20th December 2002, 07:55
Dear srinivas,
DAL contains all basic logic that must be observed upon maintaining a table entry. It makes programming easier because you don't have to code the basic check for a table manipulation in every single script related to the table. The DAL script will have exactly the same name as the table it is related to. Whenever B5c finds a script with exact same name with a table, it considers it as the DAL script for the table. However, you have to put
#include <bic_dam>
in the declaration of a script to enable the use of DAL in that particular script
Rgds,
Paul
srinivas
20th December 2002, 08:50
Dear Paul,
Thanks.
If I want to write DAL a script for a customized table say tfxxx950 where I ahve to write the script? In other words how I can create a DAL script for a table?
Regards,
FransG
20th December 2002, 10:13
Hi,
Create a new script of type Library. The script code should match your table code (this is a standard rule). So, in your case your DAL script should be tfxxx950.
Within the DAL script itself you do not specify #include <bic_dam> but:
#include <bic_dal>
Renegade
20th December 2002, 10:37
Hi Srini,
Should u need any sample DAL, I can send u.
U would feel comfortable if u see the working of DAL in a script
KlayVessel
2nd January 2003, 08:07
Originally posted by srinivas
Can I write DAL code for a standard table table?
You can write DAL code for a standard table as well. This is done exactly the same as given by FransG's answer. However, you can only have one DAL script (normally) for a table. This would cause problems for any standard table that already has a DAL -- you would need the source (or see below) to make changes. If the standard table does not currently have a DAL and you create one, you do run the risk of Baan adding one in a later update and then your custom DAL would override Baan's.
Another solution is QKEY (http://www.fullscope.com/qkey.htm) which works very well with developing DALs. With this you can override/extend specific DAL methods, and/or add new ones, without losing the functionality provided in the original DAL and without having the source for that DAL.
[Note: I work for the same company that offers QKEY; actually I'm the author and maintainer.]