Date Problem

kirsch59

Member
When I access a table's date field from the chui Progress editor it displays fine. When I access the table's date field from Webspeed the value is incorrect. Here's some samples.

Good Date Bad Date
Progress Editor Webspeed
01/05/12 3/5/1999
01/05/12 4/21/1999
1/7/2000 01/05/12

Most of the date fields work like a charm.

Thanks for your time.
 

Cringer

ProgressTalk.com Moderator
Staff member
I think the problem is that those are allegedly the same dates, but that they display as completely different dates in Editor vs Webspeed.
 

kirsch59

Member
Here's a snippet of the WebSpeed code:

run noties('sxstagecd_1').

procedure noties.
def input param search-str as char no-undo.
for each oeeh where cono = cono and keyindex contains search-str no-lock:
MESSAGE "order: " oeeh.orderno oeeh.ordersuf " promise dt: " oeeh.promisedt.
...

The output in the server log is as follows:
order: 1000588 0 promise dt: 10/29/01
order: 1000584 0 promise dt: 03/02/01

*************************************************************************************************
Here's the code from the CHUI Progress Editor:

find first oeeh where cono = 1 and orderno = 1000588 no-lock no-error.
disp orderno ordersuf promisedt.

output:
Order # Order Suffix Promised
─────── ──────────── ────────
1000588 00 01/05/12

find first oeeh where cono = 1 and orderno = 1000584 no-lock no-error.
disp orderno ordersuf promisedt.

Output:
Order # Order Suffix Promised
─────── ──────────── ────────
1000584 00 01/06/12


*******************************************************************************************************

When I run the CHUI code from the Webspeed Scripting lab I get the same results as the Progress Editor. Bizarre.
 

TomBascom

Curmudgeon
You have completely different query criteria:

for each oeeh where cono = cono and keyindex contains search-str no-lock:

vs.

find first oeeh where cono = 1 and orderno = 1000588 no-lock no-error.

Why wouldn't you expect different results?
 

kirsch59

Member
I'm accessing the same order record - oeeh.orderno = 1000588. I would expect the oeeh.promisedt value to be the same for order# 1000588 whether I'm using WebSpeed or the Progress Editor.
 

Stefan

Well-Known Member
I'm accessing the same order record - oeeh.orderno = 1000588. I would expect the oeeh.promisedt value to be the same for order# 1000588 whether I'm using WebSpeed or the Progress Editor.

I have no expectation whatsoever since I do not know what the unique index is on oeeh. Apparently you also have no idea, which is why you are using FIND FIRST instead of FIND.
 

lee.bourne

Member
You need to run exactly the same code on both otherwise it is not a proper test. By using FIND FIRST rather than FIND you don't eliminate the possibility that there are multiple records that match your criteria (each with a different date). How about hardcoding the criteria for the purposes of this test? Try running this query on both CHUI and Webspeed:

for each oeeh where cono = 1 and orderno = 1000588 no-lock:
disp orderno ordersuf promisedt.
end.

Lee
 
Top