Hi,
I'm trying to update a bunch of records from BASIC code:
oRowset = createUnoService("com.sun.star.sdb.RowSet")
oRowSet.DataSourceName = sDBName
oRowSet.User = "marc"
oRowSet.Password = "****"
oRowSet.ResultSetConcurrency =
com.sun.star.sdbc.ResultSetConcurrency.UPDATABLE
'
if update then
oRowSet.CommandType = com.sun.star.sdb.CommandType.COMMAND
oRowSet.EscapeProcessing = FALSE ' native SQL, ggf. ausschalten!
' Feldnamen aufbereiten
...
' Schlüssel extrahieren
...
oRowSet.Command = sSQL
oRowSet.execute()
oColumns = oRowSet.getColumns()
' über alle Reihen bzw. Elemente der Ergebnismenge
while NOT(oRowSet.IsLast())
oRowSet.next()
' Werte neu setzen
for n=0 to columncount-1
... here the updateXxxx() methods are used to set the new values
next
' wegschreiben
oRowSet.updateRow()
wend
...
The last instruction "oRowSet.updateRow()" crashes on the first call.
Tested on OOo1.1.0/FreeBSD and OOo1.1.1/Win98. The same sequence works
perfectly well if "moveToInsertRow" and "insertRwo()" are used.
My questions:
- Is there anything worng in the function sequence?
- Has a bug in this area been fixed in OOo1.1.3...1.1.5?
TIA,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]