tadoquery

TADOQuery filter and an expression always true.

I am trying to filter some records from a TADOQuery. I set the filtered property to true and when I set the filter to field='value', all works fine. I would like to dynamically build this filter by appending <space>AND field='value' to a value always true, and I thought 1=1 would do the trick. So I would have 1=1 as the default filte...

How to achieve independant cloned TADODataSet ?

Hi guys. The scenerios is like this: We have some SQL table. We are perfroming an SQL query on this table and we have results in TADOQuery object. var qryOryginal, qryClone: TADOQuery; begin //setup all the things here qryOryginal.Active := True; qryClone.Clone(qryOryginal, ltBatchOptimistic); qryOryginal.Delete; //delete i...

Delphi TADOQuery SaveToFile problem

I have written an application that allows a user to create and run a query, then save the report to file. They can load the report from file at a later date and view on screen. I use a TADOQuery component to run the query, and call SaveToFile when the query has returned data. I then use LoadFromFile to load the data back into a TADOQuer...

2 TADOQUERY master and Detail tablefilter insert

How can i work with 2 Tadoquery and work like a Tadoquery (master) Tadotable(detail) !! var tempvar : Variant; begin Edit1.text:=Ano.value; Begin with Ano_planeamento do //Laço de consulta por codigo Begin Close; SQL.Clear; SQL.Add('SELECT * from planeame...

is there a way to update or insert TADOQuery from TADOQuery1

i have nou 2 query´s TADOQuery and TADOQuery1 and i wouth like to update TADOQuery record´s from TADOQuery1 via code is it possible ?? they have the same field´s Thank´s Ml ...

TADOQuery UpdateBatch CancelBatch similarity in C#.NET/ADO.NET

ON a form with a Grid I want to allow users to edit data but not actually post to the database until the press the save button and if they press the cancel button I want for all changes made in the Grid to the data to be undone if possible. Donnelly ...

How do you use NOLOCK with TADOQuery and TADOTable?

I have the SQL text "SELECT * FROM TABLE1 WITH (NOLOCK)". Two questions: How do I make my TADOQuery use the NOLOCK hint without having to include that in the SQL text? I have literally thousands of TADOQuery's with their SQL dynamically built, and it would be difficult to add WITH (NOLOCK) to all of them, not to mention I use with wit...

insert to a diffrent table onNewRecord

got an ADOQuery that has OnNewRecord event. on the procedure i try to add data automaticaly to another table. the data is a few rows that are needed and handled in clientDataSet in case of cancellation. at the loc OtherAdoQuery.insert; i get error that ADOQuery failed to insert null into a non null field. i am in insert mode, howev...

adoQuery Filter

Could you please provide me with a simple example of using the Filter Property of ADOQuery in Delphi 7? Thanks. ...