>>>>> "Peter" == Peter Harvey <pharvey@stripped> writes:
>> I have checked the source code of SQLSpecialColumns but couldn't find
>> anything wrong; I will try to later today test it troughly.
Peter> Ok. I have a two column table with no primary key or indexs.
Peter> returns both columns to me when I ask for SQL_BEST_ROWID. My thinking is that
Peter> should return an empty result set because there is no way to uniquely id a row?
Peter> The spec says that the result columns can be used to id no rows or exactly one
Peter> Peter Harvey
Yes; In the case of no primary keys, MyODBC returns all columns.
I have played with the idea of allowing one to use the following
syntax to update the table in this case:
UPDATE TABLE foo set col1='new value' where col1='constant' and
col2='constant' .. LIMIT 1
This will VERY nicely solve the problems of updating any row, even if
you don't have a primary key!
(DELETE already allows the use of LIMIT).
I just checked the ODBC documentation and it seams that you are right;
In the case of no keys MyODBC should return an empty set (even if the
above solution would be quite nice !).