Subject | Re: [firebird-support] Re: Different separators for date and time |
---|---|
Author | Milan Babuskov |
Post date | 2005-06-11T09:13:45Z |
Salvatore Besso wrote:
If importing program just reads the data, make SQL statements of it and run
those statements, then it knows about Firebird. And if that is the case, then
it can know the types of parameters: once you prepare an INSERT statement with
parameters, you can deteremine parameter type and then convert the strings
(from that other application) to appropriate type. I know this is some work
(one or two days probably), but it can make your life a lot easier afterwards
as you can discard invalid data, and it won't get into database.
If you can alter the "another application", then just make it format dates as
YYYY-MM-DD as it seems most unambiguous.
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> sorry, but for the particular job that I have to do I cannot useAre you able to change "importing program" or "another application"?
> parameterized queries. The importing program is receiving the rows from an
> export made by another application and this export already contains all
> needed data. The importing program knows nothing about the incoming data,
> thus it wouldn't be able to supply any parameter.
If importing program just reads the data, make SQL statements of it and run
those statements, then it knows about Firebird. And if that is the case, then
it can know the types of parameters: once you prepare an INSERT statement with
parameters, you can deteremine parameter type and then convert the strings
(from that other application) to appropriate type. I know this is some work
(one or two days probably), but it can make your life a lot easier afterwards
as you can discard invalid data, and it won't get into database.
If you can alter the "another application", then just make it format dates as
YYYY-MM-DD as it seems most unambiguous.
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org