🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.databases
Article #184

Date problem with SQL

#184
From: Jocelyn EMANVILLE
Date: Fri, 08 Sep 2000 18:28
56 lines
3326 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_0021_01C019D3.68B10780
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
i got a problem with the ParamByName function, in a query, i want that :
      Add('AND date_stocker BETWEEN ''01/09/:Annee_Debut'' AND =
''31/08/:Annee_Fin''');

in fact it would be that after the ParamByName function: (french date =
format)
      Add('AND date_stocker BETWEEN '01/09/2000' AND '31/08/2001');

But Delphi say me that it can't locate "Annee_Debut"  !!!  :-(
How it can work ?

------=_NextPart_000_0021_01C019D3.68B10780
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DTahoma><FONT size=3D2>i got a problem with the =
ParamByName=20
function, </FONT><FONT size=3D2>in a query, i want that =
:</FONT></FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;Add('AND=20
date_stocker BETWEEN ''01/09/:Annee_Debut'' AND=20
''31/08/:Annee_Fin''');</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>in fact it would be that after the =
ParamByName=20
function: (french date format)</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;Add('AND=20
date_stocker BETWEEN '01/09/2000' AND '31/08/2001');</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DTahoma size=3D2>But Delphi say me that it can't locate =

"Annee_Debut"&nbsp; !!!&nbsp; :-(</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2>How it can work =
?</FONT></DIV></BODY></HTML>

------=_NextPart_000_0021_01C019D3.68B10780--
Technical Details
Message-ID: <Ydau5.1500$a41.12360@nnrp1.none.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!skynet.be!newsfeeds.belnet.be!news.belnet.be!oleane.net!oleane!jacui.paris.none.net!news.none.net!nnrp1.none.net.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,a992f67cc979b78a,start
X-Google-Attributes: gidffff5,public
X-Google-Thread: f973d,a992f67cc979b78a,start
X-Google-Attributes: gidf973d,public
X-Google-Thread: f894d,a992f67cc979b78a,start
X-Google-Attributes: gidf894d,public
X-Google-ArrivalTime: 2000-09-08 11:34:38 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!news-feed.riddles.org.uk!skynet.be!newsfeeds.belnet.be!news.belnet.be!oleane.net!oleane!jacui.paris.none.net!news.none.net!nnrp1.none.net.POSTED!not-for-mail
From: "Jocelyn EMANVILLE" <floriane.emanville@freesbee.fr>
Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi,alt.lang.delphi
Subject: Date problem with SQL
Lines: 57
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----=_NextPart_000_0021_01C019D3.68B10780"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <Ydau5.1500$a41.12360@nnrp1.none.net>
Date: Fri, 8 Sep 2000 20:28:55 +0200
NNTP-Posting-Host: 212.129.5.128
X-Complaints-To: abuse@freesbee.fr
X-Trace: nnrp1.none.net 968437752 212.129.5.128 (Fri, 08 Sep 2000 20:29:12 MET DST)
NNTP-Posting-Date: Fri, 08 Sep 2000 20:29:12 MET DST
Organization: Freesbee.fr