WAG. Do you have
#DEFINE readwrite ... somewhere in your code/header file?
>I am having a problem at runtime. The following code works well from a development environment. But, when I put the application into the runtime menu, the cursor becomes read only.
>
>SELECT * from Table1 ;
> WHERE Table1.salesrep = thisform.lcsalesrep AND ;
> BETWEEN(Table1.quotedate, thisform.ldbdate, thisform.ldedate) AND ;
> EMPTY(current) AND EMPTY(status) ;
> ORDER BY customer, ecustomer ;
> INTO CURSOR a_tmpf readwrite
>
>
>I then need to scan through the cursor. I do so with the following code:
>*-- Establish relation between tmpf cursor and Table2 for reporting
>SELECT a_tmpf
>SET RELATION TO ecustomer INTO Table2
>
>
>*-- Locate last rebate
>GOTO top
>SCAN
> IF SEEK(customer + ecustomer, "Table3","invno2")
> replace a_tmpf.lastcdate WITH Table3.invdte
> ENDIF
> IF EMPTY(a_tmpf.lastcdate)
> *-- set date insertion variable
> ldmaxdate = {}
> IF SEEK(customer+ecustomer, "Table4","invno2")
> DO WHILE a_tmpf.customer + a_tmpf.ecustomer = ;
> Table4.customer + Table4.ecustomer And !EOF()
> ldmaxdate = Table4.invdte
> SKIP
> ENDDO
> ENDIF
> replace a_tmpf.lastcdate WITH ldmaxdate
> ENDIF
>ENDSCAN
>
>The problem is when the Scan begins. The cursor "a_tmpf" is read only and not updatable.
>
>What am I doing wrong? Any ideas?
--sb--