I have tried using all methods I can think of, but the data will not
save.

The code pulls data from a table, runs it through calculations, then
resaves it to the table. The data will not re-save to the table;
however, if I debug (set step on), it works. I tried slowint the scan
down. I tried using begin transaction, end transaction but it still
doesn't save.

The code is something like the following (too long to include the
whole scan). This code is not in a screen nor is it user dependent for
any interaction. I tried removing the the buffering and the
multilocks. Nothing works. It use to work, then 'out of the blue' it
stopped working. Any ideas?

scan
code stuff going on
lnvariable = filename.value1
run computations on lnvariable and save to lnvariable2
set multilocks on
cursorsetprop('buffering',5,'filename')
replace filename.field2 with lnvariable2
=tableupdate(.t.,.t.)
more code stuff going on
endscan

RE: Data will not save by anonymous

anonymous
Tue May 18 20:21:05 CDT 2004

Why not try to re-arrange your codes as follows

Open the Databas
Open the Tabl
Set Multilocks O
Set Table Buffering to

SCA
*-- do you stuff her
ENDSCA

BEGIN TRANSACTIO
SELECT Tabl
IF TABLEUPDATE(.T.,.T.
END TRANSACTIO
ELS
*-- Error Occure
*-- You can call ROLLBACK if you want to if you made changes to tables whil
inside the BEGIN... END TRANSACTIO
ENDI
END TRANSACTIO

Just a thought, hope it will help..

Lha


----- Anonymous wrote: ----

I have tried using all methods I can think of, but the data will no
save

The code pulls data from a table, runs it through calculations, the
resaves it to the table. The data will not re-save to the table
however, if I debug (set step on), it works. I tried slowint the sca
down. I tried using begin transaction, end transaction but it stil
doesn't save

The code is something like the following (too long to include th
whole scan). This code is not in a screen nor is it user dependent fo
any interaction. I tried removing the the buffering and th
multilocks. Nothing works. It use to work, then 'out of the blue' i
stopped working. Any ideas

sca
code stuff going o
lnvariable = filename.value
run computations on lnvariable and save to lnvariable
set multilocks o
cursorsetprop('buffering',5,'filename'
replace filename.field2 with lnvariable
=tableupdate(.t.,.t.
more code stuff going o
endsca


Re: Data will not save by Chaim

Chaim
Tue May 18 21:49:28 CDT 2004

I can't tell for sure what is going wrong, but try rearranging your code as
follows:

NOTE: this is not necessary: set multilocks on

cursorsetprop('buffering',3,'filename') && note use 3 for optimistic record
locking or 2 for pessimistic record locking
&& 5 is for table locking which you don't want since you update each
record

SELECT or USE the table
scan
code stuff going on
lnvariable = filename.value1
run computations on lnvariable and save to lnvariable2
replace filename.field2 with lnvariable2
=tableupdate(.t.,.t.)
more code stuff going on
endscan



Re: Data will not save by Ty

Ty
Wed May 19 08:37:41 CDT 2004

On the REPLACE statement, you may need to remember to use the IN clause.
You may have a scoping issue going on there.

REPLACE field2 WITH lnVariable2 IN filename

The fact that you have filename.field2 will not error but it is not scoped
to the dataset. This is a thought...

"Anonymous" <wipeout64@hotmail.com> wrote in message
news:c835bafc.0405181527.7616a58e@posting.google.com...
> I have tried using all methods I can think of, but the data will not
> save.
>
> The code pulls data from a table, runs it through calculations, then
> resaves it to the table. The data will not re-save to the table;
> however, if I debug (set step on), it works. I tried slowint the scan
> down. I tried using begin transaction, end transaction but it still
> doesn't save.
>
> The code is something like the following (too long to include the
> whole scan). This code is not in a screen nor is it user dependent for
> any interaction. I tried removing the the buffering and the
> multilocks. Nothing works. It use to work, then 'out of the blue' it
> stopped working. Any ideas?
>
> scan
> code stuff going on
> lnvariable = filename.value1
> run computations on lnvariable and save to lnvariable2
> set multilocks on
> cursorsetprop('buffering',5,'filename')
> replace filename.field2 with lnvariable2
> =tableupdate(.t.,.t.)
> more code stuff going on
> endscan



Re: Data will not save by wipeout64

wipeout64
Wed May 19 16:55:57 CDT 2004

Thanks for all of your suggestions. I'll try them out and let you know.