Re: oracle question
| From: | Justin Patrin | Date: | Mon, 03 Jan 2005 18:19:08 +0000 |
| Subject: | Re: oracle question | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35316@lists.php.net to get a copy of this message | ||
On Mon, 03 Jan 2005 17:04:17 +0100, Lukas Smith <lsmith@php.net> wrote:
> Hi,
>
> I was just wondering if maybe some oracle expert can shed some light on
> this. I am trying to use native prepared support as much as possible in
> the oracle driver and I have encountered an issue with the way MDB2 is
> currently handling dates for oracle. Essentially all date values are
> wrapped in a TO_DATE() call. This has been directly taken from Metabase.
> I also set the following at connect:
> ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
>
> Now oracle doesnt like me using a function call for bound parameters. I
> may be able to get around this by sticking the actual value into the
> TO_DATE() call, but this gets messy as I would then have to replace the
> actual placeholder even if its already an oracle style ":foobar"
> placeholder.
>
> So the question is do I even need the TO_DATE() call if I see the
> NLS_DATE_FORMAT?
As long as you change the format, any date you send in with that
format will work.
What if a user's program changes this, though?
>
> The other issue I am currently running into is that it seems I probably
> have to parse all prepared queries and split them up anyways in order to
> get LOB support working, since there I need to replace the placeholders
> with EMPTY_BLOB()/EMPTY_CLOB().
>
> regards,
> Lukas
>
--
Justin Patrin