🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.bugs
Article #9

Two DBKit bugs - help me find fixes please

#9
From: Mike Bray
Date: Wed, 30 Dec 1992 04:58
32 lines
2154 bytes
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@earth.wustl.edu
307-332-6973 x279
Technical Details
Message-ID: <1992Dec30.045835.24679@wuecl.wustl.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!eclnews!usenet

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.bugs,comp.sys.next.programmer,comp.databases.oracle
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!eclnews!usenet
From: mrb@earth.wustl.edu (Mike Bray)
Subject: Two DBKit bugs - help me find fixes please
Message-ID: <1992Dec30.045835.24679@wuecl.wustl.edu>
Sender: usenet@wuecl.wustl.edu (News Administrator)
Nntp-Posting-Host: earth
Organization: Washington University, St. Louis MO
Date: Wed, 30 Dec 1992 04:58:35 GMT
Lines: 32