From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a875d9649dde34e3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wns13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GWindows Database time type References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <9jSdd.54860$JG5.834450@news20.bellglobal.com> Date: Thu, 21 Oct 2004 13:26:30 -0400 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1098379589 198.96.223.163 (Thu, 21 Oct 2004 13:26:29 EDT) NNTP-Posting-Date: Thu, 21 Oct 2004 13:26:29 EDT Organization: Bell Sympatico Xref: g2news1.google.com comp.lang.ada:5589 Date: 2004-10-21T13:26:30-04:00 List-Id: Stephen Leake wrote: > Fionn mac Cuimhaill writes: >>On another front - the proposed bug list. I have an item for it. >>This might be described as a restriction rather than a bug; this is in >>GWindows.Databases. I was using one of the Field_Value functions to >>get a SQL Server datetime value into a variable of type Time (as >>defined in Ada.Calendar). The problem is that the range of dates that >>can be expressed with a variable of type Time is too narrow, and one >>of the GNATCOM routines which converts the date extracted from SQL >>Server into a Time choked on a date with a year before 1901. >> >>GNATCOM and GWindows need a calendar package similar to Ada.Calendar >>which is based on a native Windows time representation. > > Native Windows might be the wrong choice; databases are hosted on many > operating systems, and GWindows should be able to provide clients for > any of them, possibly thru ODBC. > > Here's a fragment from the MySQL manual > (http://dev.mysql.com/doc/mysql/en/TIME.html): > > MySQL retrieves and displays TIME values in 'HH:MM:SS' format (or > 'HHH:MM:SS' format for large hours values). TIME values may range from > '-838:59:59' to '838:59:59'. I think MySQL now allows you to make time and dates stricter through some configuration options (I am personally not surprised that they've received requests for this). My APQ binding had to deal with the fact that the newer versions of MySQL seem to return dates in the "YYYYMMDDHHMMSS" format as a number. This is different than the SQL standard "YYYY-MM-DD HH:MM:SS" format. But APQ-2.2 now adjusts for this. Slightly-OT and Shameless Plug: I only note this because APQ is designed to shield the application designer from some of these ugly differences. APQ-2.2 isn't quite out yet, but it is coming. I think I have spent more time revising the documentation, then I did on revising the code (whew). But the end result will be worth it, since it is now much more readable, and corrects a number of other gross problems that existed in the last manual. The biggest change is the manual now documents all API's in "code boxes" in Ada code, rather than as parameters in a table. This should make it immediately much more readable. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg