How does Base interpret Calc data types?

"Filip Lannoye" <[email protected]>
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <[email protected]>
Hello,
 
When we tried to realize a Mail Merge while registering a new datasource (=
creating a new ODB) starting from an existing Calc sheet, we came upon the
following problem: the typical Calc address data are split into a "STREET"
column and a "STREET NUMBER" field. The latter field can contain a bare
number, but also a number with a P.O., e.g. 6 or 6/2 or 6 bt 2. When the
first row of data just contains a number, Base interprets the column as
being a numeric field and ignores for all other rows anything but numbers.
As a result, "6 bt 2" is rendered as "6"!
When we check the field properties of the referenced table in ODB, we see
that the field is "NUMERIC" whereas it should be "TEXT".
The only workaround we found was to alter the first row of data to have the
"STREET NUMBER" field have a mixture of numeric and alphanumerical data.
When we do so, the entire column is interpreted as being "TEXT" as it should
be.
 
Can anyone confirm me the following statements/questions:

1.	Is it normal behavior for Base to assign a datatype to a column of a
connected source file based on the first row of data?
2.	Is there any way to enforce the datataype after the connection is
established, this is, changing the field's data type manually in ODB (in a
connection with ODS, this is not allowed)?

Thanks a lot,
 
Filip Lannoye
 
www.cirb.irisnet.be
 
Our local support:
http://www.cibg.irisnet.be/site/fr/faq
http://www.cibg.irisnet.be/site/nl/faq
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.