Hi,
here is a short example in BASIC using a RowSet for updating values:
sub bugOnRowsetUpdateRow
oRowset = createUnoService("com.sun.star.sdb.RowSet")
oRowSet.DataSourceName = "test j"
oRowSet.User = ""
oRowSet.Password = ""
oRowSet.ResultSetConcurrency =
com.sun.star.sdbc.ResultSetConcurrency.UPDATABLE
oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
sSQL = "select * from TestTab where A=15010"
oRowSet.Command = sSQL
oRowSet.execute()
oRowSet.next()
msgbox oRowset.getString(2)
oRowSet.updateString(2, "new value")
oRowSet.updateRow()
end sub
As you can see, the command is only for telling on what data the rowset
should work. The updateXxx-methods are working on the column-indexed
fields of the actual row.
For inserting you do so:
oRowSet.moveToInsertRow()
oRowset.updateXxx(index, value)
... for all columns ...
oRowSet.insertRow()
The "update row" is a virtual row existing only in the rowset until
writenn through by using "insertRow()".
Have fun,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]