🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Data/Time literals and Access Query

#1908
From: Claudio Andre Heckler
Date: Fri, 16 Jan 2004 14:54
35 lines
1751 bytes
Hi there, this is getting me nuts ...

How do I add date/time literals to a SQL query for Access?

I'm trying to run something like this:

    Select * from MyTable Where
    MyDateTimeField > #2004-01-01 00:00:00#;

But using # as the data/time delimiters makes CBuilder complain with an
"Parameter
object is improperly defined. Inconsistent or incomplete information was
provided."
error message.


I traced the error to the #s: if I query for something like this:

    Select * from MyTable Where
    MyNumericField > 100;

I don't get any errors, it all works fine.


I don't want to use parameters, I much rather embed my filter in the WHERE
clause.

So, long story short: how do I embed MS-Access date/time literals in a
CBuilder SQL
query ???


Many thanks in advance!

Claudio
Technical Details
Message-ID: <4007ee3b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,d7ad53e2c902349e
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-01-16 06:10:10 PST
From: "Claudio Andre Heckler" <Claudio.Heckler@flexint.RemoveThis.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Data/Time literals and Access Query
Date: Fri, 16 Jan 2004 11:54:36 -0300
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 200.203.48.226
Message-ID: <4007ee3b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1074261563 200.203.48.226 (16 Jan 2004 05:59:23 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail