[VSRV] Can't get an updateable cursor with VXCMD

Ken Ray kray at sonsothunder.com
Thu Sep 11 18:31:31 CDT 2003


> >I'm trying to make the following code work, and it's erroring out on 
> >me:
> >
> >on MarkRecords pRecID
> >   put "SELECT * FROM Marked WHERE RecID=0" into tSQL
> >   put Valentina("Database_SQLSelect",gMainDBRef,tSQL,2,2,2) 
> into tCurs
> >   put (pRecID & tab & gUserID) into tRecord
> >   get Valentina("Cursor_AddRecord",tCurs,tRecord)
> >   get Valentina("Cursor_UpdateAllRecords",tCurs)  -- ERROR 605 HERE
> >   get Valentina("Cursor_Remove",tCurs)
> >end MarkRecords
> >
> >What I get is "Error 605: CantBeUpdated"
>
> I wonder whether your problem can be that you do not assign field 
> values (SetField) explicitely. UpdateAllRecords works only on dirty 
> fields, so if the temp buffer has no fields dirty, it has nothing to 
> do. Also, I wonder why you use UpdateAllRecords since your cursor has 
> only a single record at this point.

Well, actually the code above is simplified to only post a single
record; in actuality it works with one or more records. However perhaps
I hit on another bug; if I just do "Cursor_AddRecord" without the
"Cursor_UpdateRecord" (or "Cursor_UpdateAllRecords"), it doesn't "take".
The code was working fine in the standalone version of Valentina; it's
only when I am trying to tweak my code to work with VSRV that I run into
this problem.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the Valentina mailing list