Subject | Re: Newbie: Setting the Date format |
---|---|
Author | cdb4w |
Post date | 2003-10-09T10:53:35Z |
Hi Tim,
What is passed is executed. So doing something like
Select * from table where Field = 'DD/MM/YYYY'
will work on a text memo or char field without error as it is valid
for them to contain the value DD/MM/YYYY. However, if field is a
numeric then they will get an error, as expected - garbage in garbage
out.
Oh well, it was bound to happen one day. Thanks for all the replies.
I still think that set DateFormat = DD/MM/YYYY is a good idea.
Leslie.
--- In firebird-support@yahoogroups.com, Tim Ledgerwood <tim@s...>
wrote:
What is passed is executed. So doing something like
Select * from table where Field = 'DD/MM/YYYY'
will work on a text memo or char field without error as it is valid
for them to contain the value DD/MM/YYYY. However, if field is a
numeric then they will get an error, as expected - garbage in garbage
out.
Oh well, it was bound to happen one day. Thanks for all the replies.
I still think that set DateFormat = DD/MM/YYYY is a good idea.
Leslie.
--- In firebird-support@yahoogroups.com, Tim Ledgerwood <tim@s...>
wrote:
> Hi Leslie -string, or is
>
> Do you get individual fields into your DLL, or is it one long
> it a delimited string? In other words, no matter what DB you areusing,
> somehow you have to have some idea of the field you are passingthrough to
> whatever DB you are using. For example, I would expect that itwould cause
> you problems if you passed a date value to a field containing memodata ...
> etc.Server, DB2,
>
> My experience (Interbase, Paradox, dBase III, IV, Sybase, SQL
> Oracle) is that for access to a server DB, at some level you eitherhave to
> use a native class (a class providing APIs that you can call)specific to
> each SQL (for example, the Borland BDE used to use the SQL Linkslibraries,
> Crystal Reports has a different DLL for each server DB, that kindof thing)
> or you have to use some kind of generic access method, like theBDE - which
> simply wraps all the work. But there is, as far as I know, no wayof
> getting around the fact that different DBs use different SQLs -even if
> they are all ANSI 92 standard ...is (if
>
> What I would do in your case is check what the windows date format
> you are developing on the Windows platform) and decode the stringthat way
> - then re - write the string into a format that is understood byall SQLs -
> I believe that "DD-MMM-YYYY" is such a format. I.e., it doesn'tmatter
> whether you are using Oracle or dBase III, date passed to thedatabase in
> the format "09-OCT-2003" will be understood by all of them.Interbase /
>
> In my experience with client apps, your problem isn't with
> Firebird, by the way. If your users are using any of the Microsoftthemselves -
> products, they are generally able to change the date format
> and even make thier own date formats. In South Africa, as inAustralia, the
> "standard" date format is "dd/mm/yyyy".has been
>
> But I have often found users who will set thier own date format, or
> continue using the default US standard of mm/dd/yyyy. My solution
> to either decode whatever date I am getting, using the Windowsshort date
> format, and build the string I require, or in some cases, toactually
> change the system settings every time the application runs.
>