Hello,
Must save some pieces of text (mostly paragraphs) from in a
OOwriterDocument into a Database.
I, as non pro coder, looked at different sources found different
solutions but have still some questions about the best way to do save to
a database
- What type of datasourse is the most convieniend , DB, OObase, MySQL ?
- Whats the best way to save a new record: a SQL statement like
' connect to Database
oDatabaseContext =
createUnoService("com.sun.star.sdb.DatabaseContext")
oDataSource = oDatabaseContext.getByName("testDB")
oConnection =
oDataSource.GetConnection("","")
' prepare the Statement
Statement = oConnection.prepareStatement(sSQL)
' insert the binary Stream for ( ? ) placeholder 1
Statement.setBinaryStream(1, oInputStream, iFileSize )
' write to Database ( Use iAccess to check Success if you want)
iAccess = Statement.executeUpdate()
or using the
http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XRowUpdate.html
method
Thanks for any hints
Fernand
- [api-dev] Wrinting text to Da... sos
- Re: [api-dev] Wrinting t... Frank Schönheit - Sun Microsystems Germa ny
- [api-dev] Wrinting text ... sos
