Am Dienstag, den 22.11.2005, 09:07 -0500 schrieb [EMAIL PROTECTED]:
> Yes,
> 
> That made no difference.
> 
> What is interesting though, is that the RowSet.Command
> = COMMAND doesn't even recognize the INSERT in this
> form:
> 
> INSERT INTO table ([columns]) VALUES ([values])
> 
> At least it parsed the INSERT when in form:
> 
> INSERT INTO table VALUES ([values])
> 
> But then refused to executed saying it will only do
> SELECT commands (just like the suite Query tool)! What
> the heck, the SDK docs tell me that I can use RowSet
> to modify the database(?)! ;)

It can, but apparently not by using SQL statements (see below).

> I think I will have to rewrite my function using the
> weird RowSet SDB type db access API, or use the
> Statement interface.

I don't understand, you *are* using an sdb RowSet in your first mail...

> Suggestions on which I should use: ResultSetUpdate, or
> Statement? I'm familiar with SQL... but using
> ResultSetUpdate would allow me to use non-SQL
> datasources (right?).

Looking over my Code I in fact only have used SELECT or the methods
"RowSet.updateRow()" and "RowSet.insertRow()" because they *are* working
fine.

What you can try for diagnostics is letting the a QueryComposer parse
the SQL and see it it's okay or you get a better error message:

<BASIC snippet from my working code>

oDataSource = createUnoService( _
                "com.sun.star.sdb.DatabaseContext" ).getByName( sDBName )
oConnection = oDataSource.getConnection( "", "" )
oCmp = oConnection.createQueryComposer()
oCmp.setQuery(sSQL)
sSQL = oCmp.getComposedQuery()
'inputbox "x","y",sSQL
oConnection.close()
                
oRowSet.Command = sSQL
oRowSet.execute()

</BASIC>

HTH,
Marc



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

Reply via email to