Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Unexpected result set
Tue, Mar 23 2010 4:34 PMPermanent Link

Robert Rowlands

Hello.

I have a query that seems simple enough but I get a DateTime repeated for all the records when it should be different.

The query is as follows.


SELECT
 UCS_LOGIN_TRACE.LOGIN_DATE_TIME,
 UCS_LOGIN_TRACE.COMPUTER_NAME,
 UCS_USERS.REAL_NAME,
 UCS_PROFILES.PROF_DESCRIPTION,
 UCS_USERS.Office
 FROM UCS_USERINFO
INNER JOIN UCS_USERS ON (UCS_USERINFO.USER_ID = UCS_USERS.USER_ID)
INNER JOIN UCS_LOGIN_TRACE ON (UCS_USERINFO.USER_ID = UCS_LOGIN_TRACE.USER_ID)
INNER JOIN UCS_PROFILES ON (UCS_USERINFO.PROF_ID = UCS_PROFILES.PROF_ID)
WHERE LOGOUT_DATE_TIME = 0

I have attached the table structures and the Result and cannot see why the LogIn Start field gives the same for both records.

Thanks.

Rob.



Attachments: LoggedIn.zip
Thu, Mar 25 2010 2:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robert,

<< I have a query that seems simple enough but I get a DateTime repeated for
all the records when it should be  different. >>

Please post any binary attachments in the Binaries group/forum.

Also, you didn't actually show the structure of the tables being used.  It
appears that you have the dates/times defined as float fields in DBISAM.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Mar 25 2010 3:14 PMPermanent Link

Robert Rowlands

Tim.

Sorry about that.

I have posted images of the table structures to the Binaries NG.

With respect to the float field it is as used by the security component I use for logging in to the application and restricting access to various procedures depending upon position within the business.

I really could not see where the problem lay but as a result of your asking after the float field I went to check how I'd converted it back to a date.

The error was entirely mine.  I was doing it in the GetDisplayText of the grid but was referencing the field in the query as opposed to the record in the grid.  I guess the pointer does not move in the query with the record being drawn so I was converting the float of the first record every time.

Slowly I'm getting there.

Thanks again.

Rob.
Image