Just a quick sanity check before I open an issue on this.

I have the following small basic routine. I have run it with four different types of connections:
SDBC (HSQLDB), ADO (OLE DB Jet), ODBC (MySQL), JDBC (MySQL)

Of course each time the routine is altered appropriatly. I have tried it with ResultSet and RowSet objects.

Here is the code as it stands for the ADO connection to a Jet MDB file.

Sub Main
dim oConnection as object
dim rs as object
dim cntxt as object
dim dbsource as object

cntxt = CreateUnoService("com.sun.star.sdb.DatabaseContext")
dbsource = cntxt.getByname( "noaccessADO" )
oConnection = dbsource.GetConnection( "Admin", "" )

rs = createUnoService("com.sun.star.sdb.ResultSet")
With rs
    .activeConnection = oConnection
    .CommandType = com.sun.star.sdb.CommandType.COMMAND
    .Command = "select * from biblio"
    .EscapeProcessing = False
    .ResultSetType = com.sun.star.sdbc.ResultSetType.SCROLL_SENSITIVE
    .ResultSetConcurrency =  com.sun.star.sdbc.ResultSetConcurrency.UPDATABLE
    .execute
End With

rs.next

rs.moveToInsertRow()

rs.updateString(1, "Johnson" )

rs.insertRow()

rs.dispose
oConnection.dispose

End Sub

In every case the line rs.insertRow() crahses OO.o.

This is on a WinXP Home Edition SP2, OO.O 1.9.128, Java Sun 1.05.04. However, the problem has existed, on my machine, since 1.9.125.

Is there anything obvious that I am doing wrong here, if I don't hear anything tomorrow I will go ahead an open an issue.

Just to make sure I tested this routine on the same database

sub insert2
dim oConnection as object
dim rs as object
dim cntxt as object
dim dbsource as object
dim stmt as object

cntxt = CreateUnoService("com.sun.star.sdb.DatabaseContext")
dbsource = cntxt.getByname( "noaccessADO" )
oConnection = dbsource.GetConnection( "Admin", "" )

stmt = oConnection.CreateStatement

stmt.executeUpdate( "Insert into biblio ( identifier) values ( 'Johnson' )" )

oConnection.dispose

end sub

It executes without a problem, and is functionaly identical to the first. ( At least I sure hope it is :-) )

Thanks

Andrew Jensen

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to