none
Cannot update the cursor <cursorName>, since it is read-only.

    Question

  • Hi all,

    I am creating a readwrite cursor (selecting from other table into readwrite cursor -VFP). But when I try to update it, the error "Cannot update the cursor <cursorName>, since it is read-only." occured. This application is accessed from a server. and some users getting this error. Is there any access issue for the tmp folder? Where this cursors creating? Can anyone have any ideas on this?

    Regards

    Friday, April 05, 2013 6:58 AM

Answers

All replies

  • please post your sample code. so we can help easily.

    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh 's Blog

    VFP Form to C#, Vb.Net Conversion Utility

    Friday, April 05, 2013 7:36 AM
    Answerer
  • Some computers/windows come with default readonly for C: drive and C:\WINDOWS.

    1) Check the user privileges.

    2) try to open Windows explorer on the dirve+directory and check the properties.

    3) try to create a temp file (into the temp directory) and check if it works, if it does, try to make your query instad INTO CURSOR as INTO TABLE (GETENV("TEMP")+<filename>).... to see if this works, at least you will discard the write part into temp directory.

    Friday, April 05, 2013 3:54 PM
    Moderator
  • How you create RW cursor?

    Post code.


    Systems Analyst

    Saturday, April 06, 2013 6:02 PM
  •          Try creating  using AFIELDS() FUNCTION   it must  CREATE READ WRITE CURSOR       

             Next  an example  IT WORKS   :

     SELECT  * FROM  historyf  INTO CURSOR  soso  WHERE  !deleted() .and. part_nc=mpart_nc ;
                         .and. stock_c=mstock_ch
    *........
                =AFIELDS(aak)
                CREAT  CURSOR  haha1  FROM  ARRAY  aak
                APPEN FROM DBF("soso")
                IF  mkola22 = 0 .OR.( mkola22=1 .AND. (MPART_NCO !=MPART_NC) )
                   Appen blank
                   replace  part_nc    with    mpart_nc
                   replace  outq         with    moutq
                   replace  date         with    mdate
                ENDIF

    *.............THE NEW CURSOR   haha1  IS READWRITE  ONE......................*

    *.......for any version  of vfp..........2->9...........................................................*


    azizsallam



    Sunday, April 07, 2013 4:10 AM
  • Check in VFP Help

    SELECT - SQL Command - INTO or TO Clause

    [NOFILTER | READWRITE]


    Systems Analyst

    Sunday, April 07, 2013 9:52 AM
  • Hi,

    Few things which could prevent write access.

    If the error are intermittent

    a) Turning SMB2 protocol on either on your server or client.

    b) Running utility applications such as backup apps while the your VFP application in use.

    c) Antivirus applications.

    If the errors are permanent

    a) User might be not provided adequate windows file/folder access or permission.

    b) Temporary file folder resides within windows restricted areas such as C:\ drive in windows 7.

    c) The master table which is used to create the cursor is comply VFP DBF policies such as length of the field name width does not exceed the maximum allowed, etc...


    Cheers!

    Wednesday, April 17, 2013 8:59 AM
  • Cursors are created using temporary files. If you want to get the location of your cursor kindly use following method..

    ****

    CREATE CURSOR <cursorName> .......

    SELECT <cursorName>

    wait window DBF()

    ***

    When you execute the above code 'Wait Window' will show you the exact location of cursor/temporary file in your system.

    After checking the location .. check the Properties of that storage media.. Change properties as per your requirements..

    Wednesday, April 17, 2013 1:26 PM