Board index » delphi » "Table does not support this operation because it is not uniquely indexed"...
Philip Green
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Philip Green
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
"Table does not support this operation because it is not uniquely indexed"...
I have a Delphi 3 daabase application accessing a table on an SQL 6.5
server. To create a new record, I run a stored procedure then call LAST on my dataset. This allows my IDENTITY field to be generated and saves problems with that being null. My IDENTITY field is also my PRIMARY KEY field and is, therefore, unique with a clustered index. However, one day it has started ginving the error "table does not support this operation because it is not uniquely indexed" when I attempt to create a new record from within Delphi. The problem appears to be when I call DATASET.REFRESH, which is the only way I could get it to work properly. Any ideas??? Cheers. |
Team
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...With SQL Backends you must close and open the Dataset to refresh the result set since the server side determines the result set. QuotePhilip Green wrote: Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) Maybe it was infatuation or the thrill of the chase. Maybe you were always beyond my reach and my heart was playing safe. But was that love in your eye I saw or the reflection of mine? Give me time, won't you give me that time! Welcome back to the circus. (Fish) |
Philip Gree
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...Cheers. Jeff Overcash (TeamB) <overc...@onramp.net> wrote in message Quote> With SQL Backends you must close and open the Dataset to refresh the |
Philip Gree
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...I have tried closing and then reopening the dataset for each new record, but I am getting access violations. Any idea why this may be? QuotePhilip Green <ph...@coldseal.co.uk> wrote in message Quote> Cheers. |
Team
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...No, I don't use SQL 6.5, but I'd suspect something in the driver. Are you explicitly preparing the query? QuotePhilip Green wrote: Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) Maybe it was infatuation or the thrill of the chase. Maybe you were always beyond my reach and my heart was playing safe. But was that love in your eye I saw or the reflection of mine? Give me time, won't you give me that time! Welcome back to the circus. (Fish) |
Robert Cern
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...I'd suspect bug in your code, like remembering field pointers when dataset has default fields: KeyField := Dataset.FieldByname('Key'); Dataset.Close; Dataset.Open; if Dataset has default fields, they are recreated after open, so KeyField -- No questions via email, unless explicitly invited. QuotePhilip Green wrote in message <8co751$e...@bornews.borland.com>... |
Philip Gree
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...Is there any other way of doing this than calling Dataset.Close / Dataset.Open? It appears to be when I reopen the dataset that I get access violations. I tried using RESYNC([rmExact]) instead of REFRESH, but that doesn't actually do much. The strange thing is, I have a working executable that just calls STOREDPROC.OPEN, DATASET.REFRESH, DATASET.LAST, STOREDPROC.CLOSE that works fine, but I have since changed the code (in, as far as I can see, unrelated areas) and that now gives the error about table indexes. This is wierd! Unfortunately I have other changes to make so I can't use the working executable and my code is now altered!! Jeff Overcash (TeamB) <overc...@onramp.net> wrote in message Quote> With SQL Backends you must close and open the Dataset to refresh the |
Richard Proudfoo
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:"Table does not support this operation because it is not uniquely indexed"...Philip, Are you using TTable or TQuery to access the database table? Regards, |
1. MSSQL:Table does not support this operation because it is not uniquely indexed
2. Table does not support this operation because it is not uniquely indexed
3. SQL error: Table does not support this operation because it is not uniquely indexed
4. Table does not support ... Not uniquely indexed
5. "Not Uniquely Indexed" error
6. table does not support this operation because it is not uniquely indexed...
7. ? Table does not support this operation because it is not uniquely indexed ?
8. Table does not support this operation because it is not uniquely indexed.
9. Tquery.CachedUpdates "operation not supported"
10. Table does not support this operation because it is not uniquely indexed ?