Article View: borland.public.cppbuilder.database.ado
Article #1460How to create filter string to compare tdate fields in IDE (dbase) CBuilder3 Pro
From: Cary Letsche
Date: Wed, 23 Jun 2004 13:38
Date: Wed, 23 Jun 2004 13:38
27 lines
2060 bytes
2060 bytes
I am having a terrible time getting the IDE to accept a Filter String comparing a TDate field from IDE (dBase). I'm using CBuilder3.0 Pro. Here is basically what I want to compare: FilterString = "(EFFDATE >= " + mbdate + ") AND (EFFBDATE <= " + medate + ")"; I have tried &mbdate and also tried (double) mbdate and (int) mbdate, etc. In these cases produced "improper pointer addition" among other errors. Explanations: FilterString is a ANSI String variable. mbdate is a TDate memory variable. (means beginning date of a certain period). medate is a TDate memory variable (means ending date of a period) EFFDATE is a dBase date field (means effective date) This string (and many, many others that are similar) will compile, but cause the program to encounter a runtime error, something to the effect: illegal filter string illegal character '/', etc. I have looked everywhere in the help system on this, but have found nothing to tell me how to refer to and compare TDate fields in a filter string. I appreciate any help you might be able to provide regarding this problem. Cary
Technical Details
Message-ID:
<40d9878d$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,97c87519e26c8efb,start X-Google-Attributes: gid10698b,public Reply-To: "Cary Letsche" <CLetsche@agfirst.com> From: "Cary Letsche" <CLetsche@agfirst.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: How to create filter string to compare tdate fields in IDE (dbase) CBuilder3 Pro Date: Wed, 23 Jun 2004 09:38:06 -0400 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 68.152.9.254 Message-ID: <40d9878d$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1087997837 68.152.9.254 (23 Jun 2004 06:37:17 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail