billydeng
6th November 2008, 05:16
Hi guys
when I compile in Baan 4 I got errors
1. tdsls041 not declared
2. unknow type of argument 1 for function 'db.update'
3. Argument 1 for function 'db.update' has illegal type
4 Illegal type combination'? should be:long'

I have been fixthing this for ages, the table tdsls041 which I have declared on the top of the form scripts

Function update.planning.completed.date()
{
if planningcompleted = tcyesno.yes then
select tdsls041.orno,
tdsls041.plcd
from tdsls041
for update
where tdsls041.orno = :tisfc930.dror
selectdo
tdsls041.plcd = date.num()
db.update(tdsls041,db.retry)
selectempty
message ("planning not yet completed")
endselect
endif

commit.transaction()
}

amitmmokashi
6th November 2008, 05:34
Hi billydeng,
Please declare the table tdsls041 in the declaration section.

Regards,
Amit

norwim
6th November 2008, 08:53
it has to be db.update(ttdsls041,db.retry) (2 "t"s)

hth

Norbert

mark_h
6th November 2008, 15:50
The two answers I think covered the issues. I just wanted to point out the code tags I added to your post. If you edit your post you can see the tags I added. It just makes it easier to read your code in the post.

Thanks

_Ralph_
6th November 2008, 21:33
it has to be db.update(ttdsls041,db.retry) (2 "t"s)

hth
Norbert

the declaration should be also on the same way

table ttdsls041

billydeng
7th November 2008, 00:43
Thanks guys that works, wanna cry!!my god!
db.update(ttdsls041,db.retry)
while not (tdsls041,db.retry)

mark_h
7th November 2008, 15:14
Thanks guys that works, wanna cry!!my god!
db.update(ttdsls041,db.retry)
while not (tdsls041,db.retry)

Why??? Been doing this for 8 years and the other day it took me an hour to figure out I forgot a ":" in front of a variable in a query. :D

In most cases you can search this forum and find something to help you - just read carefully and look at formats. It will take some time.