How to update a view with TAdoQuery



I am now using Delphi 5. I have a question with TAdoQuery and Access.
I have two queries:

1. SELECT * ,LEFT(Qty, 6) AS Q1 FROM Products ORDER BY LEFT(Qty, 6),IdentNo DESC
2. SELECT * ,LEN(Qty) AS Q1 FROM Products ORDER BY LEN(Qty),IdentNo DESC

The Products table has a column named "Balance", this the field I will edit in a control linked with the TAdoQuery component.

When I call TAdoQuery.Next,
The first query with raise a "Row cannot be located for updating" error,
and the second query is ok.

My test, in Access, it's ok for both queries. I do want to know the reason.

Thanks for your help,

Ou Lanhui


.



Relevant Pages

  • Re: How to update a view with TAdoQuery
    ... The Products table has a column named "Balance", this the field I will edit in a control linked with the TAdoQuery component. ... The first query with raise a "Row cannot be located for updating" error, ... My test, in Access, it's ok for both queries. ... I do want to know the reason. ...
    (borland.public.delphi.database.ado)
  • Re: Running queries one after the other
    ... > event code as follows to run two Queries, ... > changed something and forgot to retest it at the time. ... > The first query is called Append School Offers to Archive ... The form that calls the queries? ...
    (microsoft.public.access.queries)
  • Re: The queries look the same in designview??_Again
    ... the first part of the first query does a logical AND with Type ... > the same in Access 97:s designview. ... The results from the queries are also different. ... > SELECT MSysObjects.Name, Type FROM MSysObjects ...
    (microsoft.public.access.queries)
  • Re: Dialog box - paramater query
    ... Thanks for the hints, they are valueble for the future, but I found ... "Jeff Boyce" wrote: ... > How does your first query get it's parameters? ... >> queries, respectively. ...
    (microsoft.public.access.queries)
  • Join queries now not updateable. Need HELP
    ... My second query I have a table with the SDL field as the primary key. ... are fewer SDL numbers in my table than are in my first query. ... I am joining both queries where the SDL fields are equal. ... 1st qry ...
    (microsoft.public.access.formscoding)