Subject | Re: [IBO] Two little questions |
---|---|
Author | Helen Borrie |
Post date | 2001-12-06T03:19:23Z |
At 11:07 PM 05-12-01 -0200, you wrote:
"Committed" and "written to disk" are not the same thing. If you have forced writes on, changes are written to disk on Post. Commit tells the database engine to replace the existing "live" version of the record(s) with those which you have posted. Until commit or rollback, your posted updates exist as (pending) new record versions, inside the database itself.
If Forced Writes is off, everything that users are doing is held in the database cache until the OS performs a flush to disk. It appears that, in Windows, this is very dangerous. The Flush to Disk does not occur until the server is shut down. (Firebird devel is currently looking at some way to force a flush).
These are the valid ones fror IB 4.x and above:
DD-MMM-YYYY (or ..YY), e.g. 6-DEC-2001 (and the month constants are in English only, JAN, FEB, MAR, APR, MAY. JUN. JUL, AUG, SEP, OCT, NOV, DEC)
DD.MM.YYYY (or ..YY)
MM/DD/YYYY (or ..YY)
For IB 5.6 and above you can also use ISO date format, i.e.
YYYYMMDD
I believe someone demonstrated that YYYY-MM-DD also works, as long as all of the characters are numerals.
IBO's display output in controls (not including Geoff's ENH components) also misbehaves when displaying dates on a machne whose locale is not US. This issue is, however, unrelated to date literals.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>1. What is the transaction context inside a stored proc. I mean, I call aClients *always* initiate and terminate transactions. So, your client starts a transaction and calls a SP. Any SPs embedded in that SP will be inside the same transaction context.
>stored proc, wich calls a nested one, and so one. None of them start
>explictly a transaction. The whole stuff would onlyu be committed (written
>to disk??) after the first caller returns? (IB 5.6)
"Committed" and "written to disk" are not the same thing. If you have forced writes on, changes are written to disk on Post. Commit tells the database engine to replace the existing "live" version of the record(s) with those which you have posted. Until commit or rollback, your posted updates exist as (pending) new record versions, inside the database itself.
If Forced Writes is off, everything that users are doing is held in the database cache until the OS performs a flush to disk. It appears that, in Windows, this is very dangerous. The Flush to Disk does not occur until the server is shut down. (Firebird devel is currently looking at some way to force a flush).
>2. Dealing with date type (also, on IB 5.6). I want to convert a string (byThis is slightly wrong. 'MM-DD-YYYY' is not a valid date literal format for InterBase/Firebird.
>CASTing it) to a date type. What is the format recognized by interbase???
>(mm/dd/yyyy, or what??). Is there a way to define it's "date format"???
>
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>xxxx
>Quoted from: http://www.ibphoenix.com/ibp_60_sql_date_fs.html
>In v. 5 String to Date CAST (string AS DATE)
>Input format is: MM-DD-YYYY HH:mm:SS.Hun or DD.MM:YYYY HH:mm:SS.Hund
>(/ - , : . can be used as separators)
>Years in the range 00-99 will be interpreted as within 100 years of current
>year.
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>xxxxx
These are the valid ones fror IB 4.x and above:
DD-MMM-YYYY (or ..YY), e.g. 6-DEC-2001 (and the month constants are in English only, JAN, FEB, MAR, APR, MAY. JUN. JUL, AUG, SEP, OCT, NOV, DEC)
DD.MM.YYYY (or ..YY)
MM/DD/YYYY (or ..YY)
For IB 5.6 and above you can also use ISO date format, i.e.
YYYYMMDD
I believe someone demonstrated that YYYY-MM-DD also works, as long as all of the characters are numerals.
>Which separator yields which results??? And, is this about IB Server, or theThis is the database engine itself. IBO has some routines to massage literals but they don't convert e.g. '29/12/2001' into a valid date.
>client tools formatting the output???
IBO's display output in controls (not including Geoff's ENH components) also misbehaves when displaying dates on a machne whose locale is not US. This issue is, however, unrelated to date literals.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________