baan_ghai
20th June 2005, 14:41
Hi all,

I have one standard session where on the form user is able to
see the Receipt no. now i have also made one table and customized
Maintain session where user is able to Maintain some records
againts the receipt no .

when we zoom the customized session from standard session
i and import the receipt no

in case record not found in table 994 i insert the record but in case record already exits we want some modification againts the receipt no
but it's not working because data not showing

every time going on FIRST RECORD

please help. how to solove my problem.


before.program:

import("tdpur045.reno",tfpur994.reno)

select tdpur994.*
from tdpur994
where tfpur994.reno= :tfpur994.reno
as set with 1 rows
selectdo
|display.all()
selectempty
db.retry.point()
tdpur994.reno = tdpur045.reno
db.insert(ttdpur994, db.retry)
commit.transaction()
endselect

Sanjeev
__________________

mark_h
20th June 2005, 15:35
What is the key on the new table? You may just need to execute(find.data).

gettoritesh
20th June 2005, 18:16
As u have given in ur code....

as set with 1 rows..
It goes to first record and doesnot go further...
So remove this line and try again...
It should work fine..

beginer
21st June 2005, 08:03
Hi ,

Search for the Rcpt. No. in the Customised Session.


If receipt.found() then
execute(find.data)
else
execute(add.set)
endif

receipt.found() is a boolean function that would return TRUE if rcpt.no. is found else would return FALSE.

baan_ghai
21st June 2005, 11:17
hi Beginer
thanks for reply

as pur your suggest i am using execute(find data) but still facing a problem
please look that my problem.

I attach error document....


before.program:

import("tdpur045.reno",hold.reno)

select tdpur994.*
from tdpur994
where tdpur994.reno = :hold.reno
selectdo
receipt.found = true
selectempty
receipt.found = false
endselect

if receipt.found = true then
execute(find.data)
else
execute(add.set)
endif


Thanks

Sanjeev

mark_h
21st June 2005, 15:13
First - I deleted the duplicate post. I suspect you posted in more than one forum and we prefer you pick one forum and post there.

Do you get these error messages when you execute(find.data) or when you execute(add.set)?

baan_ghai
21st June 2005, 15:48
hi mark

i am facing a problem for execute(find.data).
error = "fatal error use of null pointer on"

but i also check for execute(add.set)? and it's give the message
"No Insert authorization for table"

pl.help

sanjeev

mark_h
21st June 2005, 16:17
Try it in the form.1 init.form section versus before.program.

baan_ghai
22nd June 2005, 07:11
hi mark

thanks my problem is slove

sanjeev