🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #6097

MS Access : 'Data type mismatch in criteria expression'

#6097
From: PS
Date: Tue, 01 Aug 2000 00:00
20 lines
1491 bytes
I am using an ADO connection to an Access DB.
I have a TADOQuery along the lines of:

UPDATE Engineers SET Available = :LOGON, LastLogonOff = :TIMESTAMP WHERE
EngineerID = :_SOURCE

Where Engineers table fields are Available = Yes/No (True/False),
LastLogonOff = Date/Time and EngineerID = Text.

The parameter data is set to 'bool', 'TDateTime' and 'AnsiString' using a
Variant type.

The first time the query is run, it works fine.
The second time the query is run I get a 'Data type mismatch in criteria
expression' error.

The same code works fine into a SQL 7 database of a similar structure.

Thanks in advance,
Paul Stables.
Technical Details
Message-ID: <8m63pr$29f$1@newsreaderg1.core.theplanet.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,fc570e8491be657c,start
X-Google-Attributes: gid10698b,public
X-Google-Thread: f5cad,fc570e8491be657c,start
X-Google-Attributes: gidf5cad,public
From: "PS" <paul@nospam.stables1.freeserve.co.uk>
Subject: MS Access : 'Data type mismatch in criteria expression'
Date: 2000/08/01
Message-ID: <8m63pr$29f$1@newsreaderg1.core.theplanet.net>
X-Deja-AN: 653133069
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
X-Complaints-To: abuse@theplanet.net
X-Trace: newsreaderg1.core.theplanet.net 965120635 2351 195.92.39.67 (1 Aug 2000 09:03:55 GMT)
Organization: Customer of Energis Squared
X-MSMail-Priority: Normal
NNTP-Posting-Date: 1 Aug 2000 09:03:55 GMT
Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado