Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread dbsys not returning records
Mon, Jan 15 2007 3:40 PMPermanent Link

Ed Blackburne
I have a query that runs in php (through the odbc driver rather than Delphi, etc). The
query returns proper results. However, for testing purposes, I ran my query in the dbsys
utility and NO records are found.

The most common response is that Imust not be running the same queries in each case. I had
php echo my query to the screen where I cut and pasted into dbsys so I have (hopefully)
made sure that is not the case.

Again, this query (cut and pasted into dbsys from my webpage) runs currently in php, but
has zero records in dbsys.

Any clues?

The query, in all its glory:
===================================================================
SELECT d.Resource, (CAST(CAST(d.StartDate AS CHAR(10)) + ' ' + CAST(d.StartTime as
CHAR(8)) + ':00.00' as TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 as
unxbeg, (CAST(CAST(d.EndDate AS CHAR(10)) + ' ' + CAST(d.EndTime as CHAR(8)) + ':00.00' as
TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 as unxend, e.Title,
d.Detail_num, e.Type, 'Ed' as temp FROM Detail d left join "Inventory File" i on i."Item
Number" = d.Resource left join Event_det e on d.Detail_Num = e.PartyID WHERE (i."Item
Type"=12) AND ((CAST(CAST(d.StartDate AS CHAR(10)) + ' ' + CAST(d.StartTime as CHAR(8)) +
':00.00' as TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 <= 1168148700)
AND ((CAST(CAST(d.EndDate AS CHAR(10)) + ' ' + CAST(d.EndTime as CHAR(8)) + ':00.00' as
TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 > 1168092000)
====================================================================
Tue, Jan 16 2007 8:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ed,

<< The most common response is that Imust not be running the same queries in
each case. I had php echo my query to the screen where I cut and pasted into
dbsys so I have (hopefully) made sure that is not the case. >>

My next most common response would be - are you using the same database in
both cases ? Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 17 2007 12:54 AMPermanent Link

Ed Blackburne
Tim,

I have replicated the error and am attaching a single file for your review.

Using Version 4.25 (4.25 Build 1) dbsys I get INVALID (that is, counterfactual) results.
Running the same query from the same machine on the same table using Version 4.22 (4.22
Build 4) dbsys I get VALID results.

The query for the attached table:

SELECT d.Resource, (CAST(CAST(d.StartDate AS CHAR(10)) + ' ' + CAST(d.StartTime as
CHAR(8)) + ':00.00' as TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 as
unxbeg, (CAST(CAST(d.EndDate AS CHAR(10)) + ' ' + CAST(d.EndTime as CHAR(8)) + ':00.00' as
TIMESTAMP) - CAST('1970-01-01 00:00:00.00' as TIMESTAMP))/1000 as unxend FROM Tester d

Can you replicate the problem?

Thanks,

Ed



"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Ed,

<< The most common response is that Imust not be running the same queries in
each case. I had php echo my query to the screen where I cut and pasted into
dbsys so I have (hopefully) made sure that is not the case. >>

My next most common response would be - are you using the same database in
both cases ? Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 17 2007 9:58 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ed,

<< I have replicated the error and am attaching a single file for your review.

Using Version 4.25 (4.25 Build 1) dbsys I get INVALID (that is, counterfactual) results.
Running the same query from the same machine on the same table using Version 4.22 (4.22
Build 4) dbsys I get VALID results. >>

This has been fixed already:

http://www.elevatesoft.com/scripts/incident.dll?action=viewaddr&category=dbisam&release=4.25&type=f&incident=2222

Also, please do not post large, unzipped attachments in this newsgroup.  Use a .zip file and post them in the Binaries newsgroup instead.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jan 17 2007 11:13 AMPermanent Link

Ed Blackburne
Tim,

Thank you (I did search for CAST invalid in the forum and found no reference before
posting Smiley.

-Ed




Tim Young [Elevate Software] <timyoung@elevatesoft.com> wrote:

Ed,

<< I have replicated the error and am attaching a single file for your review.

Using Version 4.25 (4.25 Build 1) dbsys I get INVALID (that is, counterfactual) results.
Running the same query from the same machine on the same table using Version 4.22 (4.22
Build 4) dbsys I get VALID results. >>

This has been fixed already:

http://www.elevatesoft.com/scripts/incident.dll?action=viewaddr&category=dbisam&release=4.25&type=f&incident=2222

Also, please do not post large, unzipped attachments in this newsgroup.  Use a .zip file
and post them in the Binaries newsgroup instead.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jan 18 2007 9:56 AMPermanent Link

"David Farrell-Garcia"
Ed Blackburne wrote:

> Tim,
>
> Thank you (I did search for CAST invalid in the forum and found no
> reference before posting Smiley.


You should be on Elevate's mailing list for notification of new
updates.  I would recommend that you look at each one of those for
whats new and update.

--
David Farrell-Garcia
Whidbey Island Software, LLC
Thu, Jan 18 2007 9:57 AMPermanent Link

"David Farrell-Garcia"
Oops, the reply I posted to Tim should have been posted to you.  Sorry.


--
David Farrell-Garcia
Whidbey Island Software, LLC
Image