Hi Christian,
1) CLIENT-SIDE
mySQL, postgreSQL - on default have
client-side cursors. This means that found N records are copied into RAM of client computer. So you can read these records fast after they arrive to client. You can read them many times. But you can only read.
If you need to modify at least one value in one of that records you should
- build string of SQL command UPDATE
- send it to remote db server
- resolve problem with up-to-date of your cursor -- it now differs from record(s) on server
- if needed again execute select and replace your records
Speed depends on N and the network speed.
You often can see usage of LIMITs to reduce N.
2) SERVER-SIDE cursors
* brings to the client computer only the first record after SqlSelect(). So if N is huge, it should be a faster reaction.
* server still remembers found N records as Set. So we spend RAM of Server.
* Server also keeps record-locks as you asked in a parameter of SqlSelect() or SqlQuery().
* you can MODIFY records of such cursor, again if you have specified this in the parameter.
So you can do just
curs.Field("Name"
.value = "NewValue"
curs.UpdateRecord()
and you get all right. This has modified a remote record, and your cursor now uses that modified value. This do not create any SQL command behind. This is special native commands in Valentina Server protocol.
When you do NextRecord() the next record is loaded from VServer. So this operation can be slower than in client-side cursor.