RowSetRowSet takes a bit more time, because during creation it collects a lot other relevant information which makes usage faster.
First time reading is a bit slower when compared to other libraries.
Once opened, updates, inserts, deletes, sorts, filters, etc. are all extremely faster than the other libs.
If we look back in the forums, we posted speed comparison with other libraries a few years back.
When a RowSet is opened for ReadOnly, again the initial reading is faster.
- Code: Select all Expand view RUN
oRs := oCn:RowSet( cSql, [aParams], [lReadOnly] )
Execute- Code: Select all Expand view RUN
aData := oCn:Execute( cSql, [aParams] )
We get the data in a multi-dimensional array.
In case we need the structure, call this immediately
- Code: Select all Expand view RUN
aStruct := oCn:Execute()
QueryResultThis is an extension to Execute.
if we use an sql like "select age from customer where id = 100"
this function returns 58, instead of {{58}}
As you indicated above, if we want to edit just one record in a table, we can
- Code: Select all Expand view RUN
aRow := oCn:QueryResult( "select * from states where code='WA'" )
//We get a single dim array { "WA", "Washington" }
// Edit the array and then
oCn:Upsert( "states", nil, { aRow } )