Re: insert and update data from basic

Marc Santhoff <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Am Dienstag, den 19.07.2005, 13:25 +0200 schrieb Frank Schönheit - Sun
Microsystems Germany:
> Hi Marc,

Hallo Frank,

> >>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 :)

I will look at that and compare, using single select statements is oaky
for counts up to twenty or so, if the number of records is growing this
can become a problem.

> >>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.

Okay, I'll try that first of all. The "select case" logik for detecting
the types is really not very sexy.

Thank you!
Marc
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.