Two DBKit bugs - help me find fixes please

From: Mike Bray <mrb_at_earth.wustl.edu>
Date: Wed, 30 Dec 1992 04:58:35 GMT
Message-ID: <1992Dec30.045835.24679_at_wuecl.wustl.edu>


I'm running NextStep 3.0 (gold) on a Turbo Color NeXTStation, and Oracle 6.0.33.2.1.

  1. I have discovered a problem with DBExpressions that I haven't seen described anywhere yet. I'm using the Oracle adaptor. I create a DBExpression with the following description: "select sysdate from dual". Executing a fetch and displaying the results gives me GMT time. Executing the same SQL statement from SQL*DBA, the Oracle administration tool gives me local time, as I expect, and need. I suspect there's a problem with an environment variable or dwrite that is used to tell the MACH kernel what time to return. Oracle Tech Support hasn't been able to tell me just what Oracle does to get the time, and I'm totally confused about how the NeXT does time localization.

I need a workaround of some sort. Merely subtracting 7 hours from the GMT time doesn't allow for semi-annual daylight time shifts.

2. Using the same DBExpression scheme as described above, but this time using the string "select to_char(sysdate,'HH:MI:SS') from dual" causes the program to crash. I isolated the problem to the presence of the colon in the format string. Substituting a period for the colon resulted in the proper response. I'm guessing that DBKit or the Oracle adaptor use an OCI call such as "osql3" and doesn't properly parse colons inside quotes, treating them like bind variables by mistake. For a workaround, I'm resigned to using periods and then doing a character substitution on the result string to get the time format I want.

Question: What version of Oracle OCI was used in the Oracle Adaptor?

Thanks,
Mike Bray
mrb_at_earth.wustl.edu
307-332-6973 x279 Received on Wed Dec 30 1992 - 05:58:35 CET

Original text of this message