Rowset.updateRow() crashes

Marc Santhoff <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.