Article View: borland.public.cppbuilder.database.ado
Article #1463Re: How to create filter string to compare tdate fields in IDE (dbase) CBuilder3 Pro
From: Mark Guerrieri
Date: Wed, 23 Jun 2004 21:03
Date: Wed, 23 Jun 2004 21:03
38 lines
2399 bytes
2399 bytes
Can you post your exact code? What components are you using and what property are assigning the filter string to? Mark "Cary Letsche" <CLetsche@agfirst.com> wrote in message news:40d9878d$1@newsgroups.borland.com... > 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:
<40d9f02c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40d9878d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,97c87519e26c8efb X-Google-Attributes: gid10698b,public Reply-To: "Mark Guerrieri" <mguerrieri@cmsgrp.com> From: "Mark Guerrieri" <mguerrieri@cmsgrp.com> Newsgroups: borland.public.cppbuilder.database.ado References: <40d9878d$1@newsgroups.borland.com> Subject: Re: How to create filter string to compare tdate fields in IDE (dbase) CBuilder3 Pro Date: Wed, 23 Jun 2004 17:03:42 -0400 Lines: 40 Organization: Creative Marketing Strategies 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: 66.200.143.50 Message-ID: <40d9f02c$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088024620 66.200.143.50 (23 Jun 2004 14:03:40 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail