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





Article #15337: Sybase SQL Anywhere update mode

 Question and Answer Database
FAQ: FAQ337B — Sybase SQL Anywhere update mode
Category: Database (ODBC)
Platform: All-32Bit
Product:
Question:
I am using Sybase SQL Anywhere version 5.5 and I want to be able
to set the UpdateMode for my dataset (Query or Table) to be
upWhereKeyOnly. When I watch SQL Monitor to see the update logic
used, it appears to act like UpdateMode is set to upWhereAll.
Why can't I update by key only?
Answer:
This problem has to do with the fact that primary key indexes
are not surfaced by SQL Anywhere in the BDE. If you run the
stored procedure sp_statistics with your table name as a
parameter(ex. sp_statistics customer), it should return all
indexes on the table specified. Doing this you will see that the
index on the primary key doesn't surface a index name.
The way to correct this is by configuring your DSN for SQL
Anywhere to allow keys to be seen. This is done by checking the
check box titled Microsoft Applications(Keys in SQL statistics)
in the Additional Connection Options Section of the ODBC
Configuration dialog for SQL Anywhere. After setting this, when
you connect to your SQL anywhere database you will be able to
see primary keys and UpdateMode will work as expected.
7/13/99 11:59:03 AM

Last Modified: 01-SEP-99