Re: How to update a view with TAdoQuery



Sorry, the Products table need a primary key. I found the reason.

Thanks.

"Ou Lanhui" <ouland@xxxxxxxxxxxxxx> 写入消息 news:482934c3@xxxxxxxxxxxxxxxxxxxxxxxxx
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

  • 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. ...
    (borland.public.delphi.database.ado)
  • Re: Parameter Search Form
    ... The reason for the parameter was to give the users the ability to search the ... The reason for the Like '%%' is because the user may not know the entire name ... simple queries like your, creating the SP is pretty straighforward. ... For controls, particularly when they are located on a subform, building the ...
    (microsoft.public.access.adp.sqlserver)
  • Re: ODBC Update
    ... The reason that the table is returning the same data is because you are ... >>I created a DSN for the VFP free table. ... >> When I 1st queries the table, using SQL Pass thru it work correctly. ...
    (microsoft.public.fox.vfp.queries-sql)
  • 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)