🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.borland-delphi
1 messages
1 total messages Started by G Smith Mon, 02 Feb 2004 19:35
Data Type Mismatch Access TADOQuery DateTime
#442
Author: G Smith
Date: Mon, 02 Feb 2004 19:35
30 lines
2896 bytes
Hi,

Im quite new to delphi and am experiencing the following problem.

Im using a TADOQuery to retrieve a date from a Access database and then wish
to use it again in another sql query, but i am getting data mismatch
exceptions.


q4.sql.text := 'SELECT (SELECT max(DateTimeMod) from LOTracking where
(LOTracking.LOID) = '+inttostr(q.fieldvalues['ID'])+') as LVDate from
LOTracking where (LOTracking.LOID) = '+inttostr(q.fieldvalues['ID']);
q4.open;


q5.sql.text := 'SELECT LOTracking.PersonID from LOTracking where
(LOTracking.LOID = '+inttostr(q.fieldvalues['ID']) +') and
(LOTracking.DateTimeMod = '''+datetimetostr(q4.fieldvalues['LVDate'])+''')';
q5.open;

The DateTimeMod field is General Date Time format.  When using the delphi
debugger to view the LVDate it is identical to that in the database and
should work.


Any help would be much appreciated,



Thanks
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads