Article View: borland.public.cppbuilder.database.ado
Article #4597Re: Updating a record with a Datetime field in Access using ADO
From: Mike Collins
Date: Mon, 05 Nov 2001 15:05
Date: Mon, 05 Nov 2001 15:05
26 lines
1798 bytes
1798 bytes
Hi Mike, I had a similar problem when using MS Access via an ADO Connection. I huntered around for ages then I saw an example in MS Access, for updating DateTime fields. In there example they enclosed the DateTime with # (hashes) i.e. #12/30/1899 3:11:11 PM#. Don't know why but it seemed to work! I tried the same thing when constructing my SQL statement and it worked (I may have only been working with the Data field, can't remember). Hope this might Help, Mike Collins Mike Gilby wrote in message <3be1901e$1_2@dnews>... > Hi, I'm having a problem updating a record in Access 2000 with a Datetime >field using ADO. My SQL statement is: > > UPDATE FileTrack SET LastTrack = 'L' WHERE Timea = '12/30/1899 3:11:11 PM' > > The error message I get is: "Data type mismatch in criteria expression.". >Any help would be appreciated. > >Mike > >
Technical Details
Message-ID:
<3be6aae3_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3be1901e$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,16214a3b4a4cdcf4 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-11-05 07:07:17 PST From: "Mike Collins" <mcollins@tynetec.demon.co.uk> Newsgroups: borland.public.cppbuilder.database.ado References: <3be1901e$1_2@dnews> Subject: Re: Updating a record with a Datetime field in Access using ADO Date: Mon, 5 Nov 2001 15:05:56 -0000 Lines: 28 Organization: TyneTec X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 NNTP-Posting-Host: 194.222.126.108 Message-ID: <3be6aae3_2@dnews> X-Trace: dnews 1004972771 194.222.126.108 (5 Nov 2001 07:06:11 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews