Filter property for ADOTable

Hi Techies,

I have written following expression in Filter property of my TADOTable connected to SQL Server 2005, but it gives me an error....kindly help

Filter := 'CONVERT(VARCHAR(10),TaskStartTime,101)='+QuotedStr(FormatDateTime('mm/dd/yyyy', Now)) +
 ' or CONVERT(VARCHAR(10),TaskNextExecution,101)='+QuotedStr(FormatDateTime('mm/dd/yyyy', Now));


thanks in advance

Jeet
0
jeet
1/30/2009 5:42:15 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

1 Replies
1094 Views

Similar Articles

[PageSpeed] 52

Hi Jeet,

The FIlter property does not work like that. The Filter property is used 
against the dataset returned on the client-side. It appears that what you 
are after is a subset of data in the table. Use the values you have below in 
a SQL statement. In fact, i would not use TADOTable. It is commonly 
recommended to use  the TADODataset and TADOCommand objects for all your 
communications with a SQL Server.

Switching what you have to a TADODataset, you can use parameters in the SQL 
statement and fill them prior to opening the dataset. BTW, i have seen many 
people suggest using parameters when dealing with date and time values.

Hth,

Brian


<jeet parmar> wrote in message news:74509@forums.codegear.com...
> Hi Techies,
>
> I have written following expression in Filter property of my TADOTable 
> connected to SQL Server 2005, but it gives me an error....kindly help
>
> Filter := 
> 'CONVERT(VARCHAR(10),TaskStartTime,101)='+QuotedStr(FormatDateTime('mm/dd/yyyy', 
> Now)) +
> ' or 
> CONVERT(VARCHAR(10),TaskNextExecution,101)='+QuotedStr(FormatDateTime('mm/dd/yyyy', 
> Now));
>
>
> thanks in advance
>
> Jeet
0
Brian
1/30/2009 4:45:25 PM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

To filter or not to filter?
A reader wrote in today asking about egress filtering. It seemed like a perfect topic considering it is one that seems to spark emotions depending on your role in your organization. I've heard arguments from both sides. Generally the lines are divided with the Network Group who deem it is to hard to do (i.e. lots of acls and/or rules, etc.) and the Security Group who says it needs to be done. Here are some questions to consider with egress filtering: http://www.dshield.org/diary.html?storyid=6262 -- "If U know neither the enemy nor yourself,U will succumb in every...

Delphi 5 with ADO
Hi I'm having some problems adjusting a Delphi5/MSSQL database application, which i did not wrote (what's more: i'm not a Delphi expert either) so i thought maybe someone in this comunity will enlighten me. It' about an SQL command which is issued by this delphi5 application (the sql command was traced in SQL server with profiler), but which is nowhere to be found in the souce code. I've searched already all the components which i knew that could issue the SQL command (TADOQuery, TADOCommand) but with no l uck. Could anyone tell me other misterious places where i shou...

Filtering property values
--------------020805080902040603060205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hey all, I'm very new to Moose, building my first app that uses more than just "has foo => (isa=>'Str', is=>'rw')"-level features. I am trying to make a property like this: has foo => (isa=>'Str', is=>'rw'); in which the property undergoes a transformation more or less like, $self->{'foo'} =~ s/\W+/_/gs; such that this would be true: ... $obj->...

ASA7, ADO and Delphi
Hello! I've got a problem with accessing a database via ADO with Delphi 5. Everytime I set the ADOConnection active I get the error "Invalid enum value". I'm using Delphi 5 Enterprise and ASA7 with EBF #449. Is there anybody who ever get an ADOConnection to ASA7 with Delphi 5? Gruesse, Matthias I'm using C++ Builder 5 and get the same problem. I've asked this question before and no one seems to be able to respond... Matthias Hovestadt wrote: > Hello! > > I've got a problem with accessing a database via ADO > with Delp...

Datawindow filter property
If a datawindow has been filtered by SetFilter() and Filter() calls, can anyone tell me how to retrieve the filter property string? Martyn Try: ls_filter = this.Describe("DataWindow.Table.Filter") I think that this returns a "?" if there is no filter defined. "Martyn Evans" <martyne@iplbath.com> wrote in message news:AMnXdKTZCHA.295@forums.sybase.com... > If a datawindow has been filtered by SetFilter() and Filter() calls, can > anyone tell me how to retrieve the filter property string? > > Martyn > > ...

Filter Object Properties
When modifying the database using the SQL Central, I changed the FILTER = OBJECT of my connected database, disabling the PUBLIC and DBA objects. This in = turn disabled me from viewing the tables contents. I tried returning the PUBLIC and = DBA object to their previous configuration but to no avail, they remains disable. Why = and How can I correct this Thanks Paul Godin godinp@navcanada.ca ...

Filter Object in Properties
When modifying the database using the SQL Central, I changed the FILTER = OBJECT of my connected database, disabling the PUBLIC and DBA objects. This in = turn disabled me from viewing the tables contents. I tried returning the PUBLIC and = DBA object to their previous configuration but to no avail, they remains disable. Why = and How can I correct this Thanks Paul Godin godinp@navcanada.ca ...

DW Filter property with Describe?
This is a multi-part message in MIME format. ------=_NextPart_000_0051_01BF5799.29841CC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable is there a way to get the filter expression from a DW during runtime? I need to capture the filter expression of any dataobject before = retrieving, set filter to nothing, then retrieve, then sort, then groupcalc, then set the original filter back and filter. (not perfect syntax) string ls_filter ls_filter =3D dw_1.describe('datawindow.filter') /* this part is = wrong, I get th...

The ADO filter does not stand spaces
hi I used Access database linked to adotable if I search for example a word (john) the filtering no problem but the problem is when I filter a word contains a sample space (john david) search result is empty, Although the word exists in the database I use this code if edit1.Text <>'' then begin ADOTable1.Filter :='book_name like '+ quotedstr(edit1.Text +'*'); ADOTable1.Filtered :=true; end else ADOTable1.Filtered :=false; unja, On Tue, 25 Jun 2013 19:06:46 +0100, unja unja wrote: > I used Access database linked to adotable > if I search ...

What the filters filter is very misleading.
Name: Thomas Wilson Email: twilsonatlbccdotedu Product: Thunderbird Summary: What the filters filter is very misleading. Comments: I've just spent three hours configuring filters for my primary email account, which deposits everything in the "local folders" container; but the configuration, it turns out was actually on the account itself (twilson@lbcc.edu) and did not affect any of the mail in the local folders container. This is extremely frustrating. Why is it that the mail from lbcc.edu goes into local folders while the filters act on lbcc.edu itself, whic...

opacity and filter properties in css
Why can't I use opacity and filter properties in css? I get the message: 'filter' is not a known css property name. Same for opacity. I'm working in web developer and I really want to create cool CSS. Please help.... Hi, it's not because the IDE tells you that it doesn't support those specific css properties that you can't use them. The only thing that matters is that the browser you're using supports those properties. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. Correct. You can change target validation schema from...

Web resources about - Filter property for ADOTable - embarcadero.delphi.ado

Property - Wikipedia, the free encyclopedia
This article may require copy editing for grammar, style, cohesion, tone, or spelling . You can assist by editing it . In abstract, property ...

Property - Wikipedia, the free encyclopedia
In abstraction, property is that which belongs to or with something, whether as an attribute or as a component of said thing. For the significant ...

Facebook's Mark Zuckerberg faces trial over Silicon Valley property deal
... broke a promise to introduce him to Silicon Valley's elite. Facebook boss Mark Zuckerberg is headed toward a trial after all as the property ...

Canberra's rental yields on the rise, despite sluggish property market
Canberra has experienced the lowest annual shift in rental prices in Australia over the past decade.

Mount Isa Police crackdown nets 20 people over property theft - The Courier-Mail Search Search
ABOUT 20 people have been charged, including 17 juveniles, after a series of break and enters and thefts in Mount Isa.

Masters faces property upheaval
Woolworths could pay heavily to break leases across its hardware portfolio.

Accused Rabobank trader reportedly sells Mandurah property for half price
A former Rabobank trader facing possible extradition to the US has sold a Mandurah&nbsp;property for less than half its purchase price, it has ...

Spiking property assessments may leave thousands without Home Owner Grant
A spike in property assessments in Metro Vancouver means thousands no longer qualify for the Home Owner Grant, unless the provincial government ...

Digital property after death issues continue as Apple requires court order for widow to get late husband’s ...
... , iOS Check out 9to5Mac for more breaking coverage of AAPL Company , iOS Devices , and Apps . What do you think? Discuss "Digital property ...

Prestige property leads house price falls
Sydney property prices fell for the second consecutive month and the top end fell fastest, dropping 2.3 per cent in December, the CoreLogic RP ...

Resources last updated: 1/20/2016 12:46:18 AM