We have been getting this error intermitantly in our package, and i hopeing
someone can shed some more light on this, and possible have a solution as to
how to get around this.

basically we are getting this in the event of trying to do replace on a
cursor that is linked to a grid and also to the control source of a text
box.

how do we get it to save first? as suggested in the help. i cant seem to
find anything that saves a temporary cursor, i thought the whole point is
that they are not actually saved to disk, but kept in memory.

Re: Cursor cannot be modified because it contains an unsaved record by Man-wai

Man-wai
Wed Mar 19 06:28:04 CDT 2008

Mark Burgum wrote:
> We have been getting this error intermitantly in our package, and i hopeing
> someone can shed some more light on this, and possible have a solution as to
> how to get around this.

Are you absolutely sure that you didn't alter the cursor after creating it?

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.24.3
^ ^ 19:26:01 up 1 day 22:36 2 users load average: 1.13 1.05 1.01
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/

Re: Cursor cannot be modified because it contains an unsaved record (Error 2072) by Stefan

Stefan
Wed Mar 19 06:42:34 CDT 2008


"Mark Burgum" <Markb@nospam.Anagram-sys.co.uk> wrote in message
news:%23XBF1qaiIHA.4396@TK2MSFTNGP04.phx.gbl...
> We have been getting this error intermitantly in our package, and i
> hopeing someone can shed some more light on this, and possible have a
> solution as to how to get around this.
>
> basically we are getting this in the event of trying to do replace on a
> cursor that is linked to a grid and also to the control source of a text
> box.

There are some threads about Error 2072 in the NG archives,
perhaps there is a solution for you among them?
http://groups.google.com/groups?as_q=&num=10&scoring=r&as_epq=cursor+cannot+be+modified&as_oq=&as_eq=&as_ugroup=*fox*&as_usubject=&as_uauthors=&lr=&as_drrb=q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=19&as_maxm=3&as_maxy=2008&safe=off


> how do we get it to save first? as suggested in the help. i cant seem to
> find anything that saves a temporary cursor,

When you use buffering, you can try a TableUpdate() attempt on
the temp cursor.

> i thought the whole point is that they are not actually saved to disk, but
> kept in memory.

The VFP runtime keeps local cursors in memory and sometimes
decides to write it to disc, so DBF('yourCursor') always returns
a file name but FILE(DBF('yourCursor'),1) is not always true.


hth
-Stefan




--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


Re: Cursor cannot be modified because it contains an unsaved record (Error 2072) by Mark

Mark
Wed Mar 19 09:21:19 CDT 2008

yes absolutely sure.


"Man-wai Chang ToDie" <toylet.toylet@gmail.com> wrote in message
news:eq17YQbiIHA.1204@TK2MSFTNGP03.phx.gbl...
> Mark Burgum wrote:
>> We have been getting this error intermitantly in our package, and i
>> hopeing someone can shed some more light on this, and possible have a
>> solution as to how to get around this.
>
> Are you absolutely sure that you didn't alter the cursor after creating
> it?
>
> --
> @~@ Might, Courage, Vision, SINCERITY.
> / v \ Simplicity is Beauty! May the Force and Farce be with you!
> /( _ )\ (Xubuntu 7.04) Linux 2.6.24.3
> ^ ^ 19:26:01 up 1 day 22:36 2 users load average: 1.13 1.05 1.01
> ? ? (CSSA):
> http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/



Re: Cursor cannot be modified because it contains an unsaved record (Error 2072) by Stephen

Stephen
Wed Mar 19 09:23:29 CDT 2008

Many thanks Stefan - useful link and articles.

Sincerely

Stephen

"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:OsoYJZbiIHA.1132@TK2MSFTNGP06.phx.gbl...
>
> "Mark Burgum" <Markb@nospam.Anagram-sys.co.uk> wrote in message
> news:%23XBF1qaiIHA.4396@TK2MSFTNGP04.phx.gbl...
>> We have been getting this error intermitantly in our package, and i
>> hopeing someone can shed some more light on this, and possible have a
>> solution as to how to get around this.
>>
>> basically we are getting this in the event of trying to do replace on a
>> cursor that is linked to a grid and also to the control source of a text
>> box.
>
> There are some threads about Error 2072 in the NG archives,
> perhaps there is a solution for you among them?
> http://groups.google.com/groups?as_q=&num=10&scoring=r&as_epq=cursor+cannot+be+modified&as_oq=&as_eq=&as_ugroup=*fox*&as_usubject=&as_uauthors=&lr=&as_drrb=q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=19&as_maxm=3&as_maxy=2008&safe=off
>
>
>> how do we get it to save first? as suggested in the help. i cant seem to
>> find anything that saves a temporary cursor,
>
> When you use buffering, you can try a TableUpdate() attempt on
> the temp cursor.
>
>> i thought the whole point is that they are not actually saved to disk,
>> but kept in memory.
>
> The VFP runtime keeps local cursors in memory and sometimes
> decides to write it to disc, so DBF('yourCursor') always returns
> a file name but FILE(DBF('yourCursor'),1) is not always true.
>
>
> hth
> -Stefan
>
>
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>



Re: Cursor cannot be modified because it contains an unsaved record (Error 2072) by Mark

Mark
Wed Mar 19 09:25:42 CDT 2008

Thanks for your quick response

i will check the articles you mentioned to see if thier is any help thier.

unfortunatly the cursor concerned is not buffered so tableupdate() wont work
according to the help. i think this started when we went over to VFP8, we
where hopeing that VFP9 would correct it (no such luck). also we only seem
to get it with some of our customers, and so far have not replicated here,
which is personally my least favorite bug, as you cant actually test that
you have fixed it. i did find one write up that suggested removing the
record source copy the contents of the cursor to an array, get read of the
cursor and then append from array into a new cursor, but that seems a bit
OTT.


"Stefan Wuebbe" <stefan.wuebbe@gmx.de> wrote in message
news:OsoYJZbiIHA.1132@TK2MSFTNGP06.phx.gbl...
>
> "Mark Burgum" <Markb@nospam.Anagram-sys.co.uk> wrote in message
> news:%23XBF1qaiIHA.4396@TK2MSFTNGP04.phx.gbl...
>> We have been getting this error intermitantly in our package, and i
>> hopeing someone can shed some more light on this, and possible have a
>> solution as to how to get around this.
>>
>> basically we are getting this in the event of trying to do replace on a
>> cursor that is linked to a grid and also to the control source of a text
>> box.
>
> There are some threads about Error 2072 in the NG archives,
> perhaps there is a solution for you among them?
> http://groups.google.com/groups?as_q=&num=10&scoring=r&as_epq=cursor+cannot+be+modified&as_oq=&as_eq=&as_ugroup=*fox*&as_usubject=&as_uauthors=&lr=&as_drrb=q&as_qdr=&as_mind=1&as_minm=1&as_miny=1981&as_maxd=19&as_maxm=3&as_maxy=2008&safe=off
>
>
>> how do we get it to save first? as suggested in the help. i cant seem to
>> find anything that saves a temporary cursor,
>
> When you use buffering, you can try a TableUpdate() attempt on
> the temp cursor.
>
>> i thought the whole point is that they are not actually saved to disk,
>> but kept in memory.
>
> The VFP runtime keeps local cursors in memory and sometimes
> decides to write it to disc, so DBF('yourCursor') always returns
> a file name but FILE(DBF('yourCursor'),1) is not always true.
>
>
> hth
> -Stefan
>
>
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>



RE: Cursor cannot be modified because it contains an unsaved record (E by Michael

Michael
Wed Mar 19 20:41:00 CDT 2008

I have come accross a similar issue when regenterating a query cursor via sql
select statement on a list box. Seems like it gets unhappy when the rowsource
is "gone" for that split second. To solve the problem completely, I have
created a cursor using the create cursor command in the init procedure of the
screen. When I need to re-fill it, I select it, zap it (I think you will need
to set safety off when issuing zap and then turn it back on), refill it using
append blank or replace or whatever is appropriate, then requery the list to
refresh it.

HTH

Mike

"Mark Burgum" wrote:

> We have been getting this error intermitantly in our package, and i hopeing
> someone can shed some more light on this, and possible have a solution as to
> how to get around this.
>
> basically we are getting this in the event of trying to do replace on a
> cursor that is linked to a grid and also to the control source of a text
> box.
>
> how do we get it to save first? as suggested in the help. i cant seem to
> find anything that saves a temporary cursor, i thought the whole point is
> that they are not actually saved to disk, but kept in memory.
>
>
>