Hi Matthias, > The following code gives me a "Function sequence error" SQLException > on the moveToInsertRow() statement. I have no idea why. > ...
Hard to guess, especially without knowing the database type. The most likely reason usually is the result set type - what does MsgBox rowSet.ResultSetType give you? Even though you specified UPDATABLE at the statement, under certain circumstances this might not propagate to the result set created by the statement. In general, I recommend using a slightly different approach. You currently manually create a lot of objects which are already encapsulated elsewehre, in particular in the css.sdb.RowSet service: rowSet = createUnoService( "com.sun.star.sdb.RowSet" ) rowSet.DataSourceName = "AdressenMSB" rowSet.CommandType = com.sun.star.sdb.CommandType.TABLE rowSet.Command = "Adressen" rowSet.execute The RowSet's advantage over the manual way is that it automatically cares for a lot of data-source-dependent stuff. For instance, your example code is not portable (to another database type) because it doesn't care for quote characters (in the SELECT statement). The RowSet does this, and much more, automatically. Thus, if there's no strong reason against using a RowSet, use it. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
