VishalMistry
16th November 2006, 06:41
Dear all,
I am having basic skills in baan tools. could anybody help me on how i can programatically insert a record in table through script. Kindly provide me the methods in sequence to perform the following things.
* insert a blank record
* set values for fields
* save the record in a table.
I would appreciate if someone provides me sample script.
Thanks in advance.
mr_suleyman
16th November 2006, 08:14
Examine Baanboard Wiki Pages. It is enough for you.
Especilally look Programerp and DB.* part.
Good luck !
Hiba_t
16th November 2006, 09:18
This is a simple example..
I hope it helps..
select xxxxxx.*
from xxxxxx for update
where ....
selectdo
set value
db.update(xxxxxx,db.retry)
commit.transaction()
endselect
suhas-mahajan
16th November 2006, 09:29
Search... db.insert here on BB. I am sure you will get expected example.
regards,
-Suhas
en@frrom
16th November 2006, 10:34
rather than db.update, you should use db.insert to insert a record.. But I think you should first get a little more familiar with Baan programming before experimenting, for it will take very few moments till you'll get stuck with new problems...
On the Wiki pages you can find lots of documentation...
Good luck!
Eli
toolswizard
17th November 2006, 15:08
You should get familiar with the 4gl event sections and the Flow of a 4gl Program.
When you create a maintenance session for a table, all the required SQL is there for simple maintenance. You can add, modify, delete, copy, etc... When you want to specifiy field edits or more complicated functions, you add a user script that has event sections which is equivelant to a function whose name has been reserved. Technically, the event section is converted to a function name for the compiled code that gets called by the stub progam, also called the standard program.