Главная страница | назад





Article #27321: How to get UpdateMode to work for TQuery on a SQL Server 7.0 table.

QUESTION:

Why are all the fields on my SQL Server table used for identifying a record even though I have UpdateMode set to upWhereKeyOnly?

ANSWER:

    The problem is that the BDE is not identifying a primary key for your table. There may be two things required to solve this problem. The first is to verify that the table has been created with a primary key declared. You can verify that a primary key exists using SQL Explorer and viewing the text of the table, or by looking at the constraints placed on that table.
    If you have verified that a primary key exits and you are still getting the error then you may need to change the SQL statement that is sent to the server. Try specifying the owner of the table before the table name (separated with a . ). For example if the owner is SYSADMIN and the table is Foo, then the SQL statement might look something like:

  select * from SYSADMIN.Foo;

Last Modified: 15-MAY-01