Re: insert and update data from basic

Frank Schönheit - Sun Microsystems Germa ny <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Hi Marc,

>>I'm trying to find a hopefully small solution for writing data to a
>>registered data source. I've tried with basic by getting a connection
>>and creating a statement from the values to write, but this is a tedious
>>task because the formatting of values (dot vs. comma) and date/time
>>values has to be done manually.

parametrized statements would have been my quick answer. Basically add
"?" instead of the concrete values, and use the XParameters interface.
(Very rough, if you still need it, I should elaborate :)

>>Another approach might be to create a temporary query object or using a
>>record set directly. But with a query I found no way to hand over the
>>data by putting it to parameters...
>>
>>Can someone please push me in the right direction for achieving my goal
>>and not reinventing the sdb[c[x]] layers?
> 
> A RowSet seems to be what is needed her. So in trying I found another
> thing unclear:
> 
> Is there a method of updating any column without decoding the type
> before?

updateObject should do.

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [email protected] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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.