bhushanchanda
19th June 2013, 10:04
Hi,
Just thought why can't DAL be invoked and used in VB script to insert data into table. I just created a script which inserts a single record into my customized table tcbed001. (The table has just a single field).
The program executes success fully, but the table is not updated. I didn't got a similar post on the Board so created one!
The similar 3GL script using all 4 functions:-
dal.new.object,
dal.set.field,
dal.save.object,
commit.transaction
works pretty well without any errors. I guess someone might have given a try to use DAL within VB script.
Here's my code (which doesn't work):-
Set BaanObj = CreateObject("Baan.Application.Test")
BaanObj.ParseExecFunction "ottstpstandard" ,"dal.new.object(" & Chr(34) & "tcbed001" & Chr(34) & ") "
Stop
BaanObj.ParseExecFunction "ottstpstandard" ,"dal.set.field(" & Chr(34) & "tcbed001.creg" & Chr(34) & Chr(34) & "," & Chr(34) & Chr(34) & "TTN" & Chr(34) & ") "
BaanObj.ParseExecFunction "ottstpstandard" , "dal.save.object(" & Chr(34) & "tcbed001" & Chr(34) & ") "
BaanObj.ParseExecFunction "ottstpstandard" , "commit.transaction()"
Set BaanObj = Nothing
Just thought why can't DAL be invoked and used in VB script to insert data into table. I just created a script which inserts a single record into my customized table tcbed001. (The table has just a single field).
The program executes success fully, but the table is not updated. I didn't got a similar post on the Board so created one!
The similar 3GL script using all 4 functions:-
dal.new.object,
dal.set.field,
dal.save.object,
commit.transaction
works pretty well without any errors. I guess someone might have given a try to use DAL within VB script.
Here's my code (which doesn't work):-
Set BaanObj = CreateObject("Baan.Application.Test")
BaanObj.ParseExecFunction "ottstpstandard" ,"dal.new.object(" & Chr(34) & "tcbed001" & Chr(34) & ") "
Stop
BaanObj.ParseExecFunction "ottstpstandard" ,"dal.set.field(" & Chr(34) & "tcbed001.creg" & Chr(34) & Chr(34) & "," & Chr(34) & Chr(34) & "TTN" & Chr(34) & ") "
BaanObj.ParseExecFunction "ottstpstandard" , "dal.save.object(" & Chr(34) & "tcbed001" & Chr(34) & ") "
BaanObj.ParseExecFunction "ottstpstandard" , "commit.transaction()"
Set BaanObj = Nothing