Frank
Some time ago, there was a discussion here or on [EMAIL PROTECTED] with Jörg
Budischewski (the author of the PostgreSQL SDBC driver) about this
issue. The conclusion back then was that there probably needs to be a
distinction between the database-default and the UI-default - ATM, OOo
only has and knows the latter.
As Ocke said, knowing possible defaults (plus the syntax to set them) of
a given database is quite impossible in a generic, portable way.
I suppose I need to go browsing in the archives from time to time. So I
don't say stupid things like
'Path of least resistance'.
Anyway, tired it. Created a table in Base with DDL and a default value
on a varchar column, Entered some values
got the default value. Then opened the design window and entered a
different default value (a literal) and entered some new
records. Got the new default value.
Then I dumped the structure with a SCRIPT command and the original
default value from my DDL command was still in place at
the server. I also noticed how the UI acts slightly differently
depending on which default is being used, the default at the
egninge level is inserted into the UI controls AFTER the new record is
posted (comitted). The default from the Base
table wrapper (is that how you would describe this) is inserted into the
control BEFORE the committ. I suppose it is happening
on resultset.moveToInsertRow.
Thanks for the help, I never would of gathered what was going on here
from just trying things, 'willie nillie'.
I think I will enter an RFE, regarding sql funtions, as Ocke mentioned .
The example that comes to mind is generating a serialized number
, such as an invoice, quote, part or whatever, where the user wants an
aggregated value eg '<dept no>-<dayofyear>-<sequence>'.
It has been a fairly common request in my experience. To do it however,
one must be able to call a user defined function from with
the default setting declaration, not just the engine's standard
functions. I see it as a farly low level priority, but a nice feature
for the future.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]