Record/Key Deleted - Driving me batty!

I have a table in SQL Server 6.0 hooked to a TTable Component defined as:


The primary key is on CP_Counterparty

When I bring up a DataGrid and attempt to modify CP_Description (with no key or index on it!) I get a
"Record/Key Deleted" error. This happens even though I AM NOT modifying the primary key field.

I remember this error from Delphi 1.0 but have long since forgotten the workaround.

Any ideas on what is causing this? Thanks in advance!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do use TQuery or TTable?
Pegasus100397Author Commented:
Edited text of question
Pegasus100397Author Commented:
Adjusted points to 256
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

I don't use these components, but the message says RECORD/key deleted. Could it be that the record in the dataset has already been deleted ?

A couple of other long shots, is maybe one of these fields is null and the delphi TQuery of TTable doesn't respond well to it ?

Tell me if I'm in the right direction...
Pegasus100397Author Commented:
Thanks ssite,

 I've pointed the TTable off to a test-table (looks the same as the old one) so I _know_ the record is still there. I've been stuck on this for three days now. The primary key is on the CP_Counterparty and when I edit the description KABLOOM! "Record/Key Deleted". I've even tried playing around with the UpdateMode on the TTable. It will then let me edit the record as it should, but when a description is edited, the rows shift all over the place in my DBGrid. Why it's doing that I don't have a clue.

I've went so far as to start a completely new "clean" app that just has the Database, TTable, Datasource, Grid & Navigator on it. Same thing happens, so I know it's not a mysterious bug in my origional app.

I've had some preliminary success with using a TQuery component (Live result set) instead of the TTable component. The SQL looks like this:

Select * from COUNTERPARTY order by CP_Counterparty

So far it let's me edit ok but I'd rather find out why the TTable is going bonkers.

Thanks for your help and sorry for the long comment ;^)

Try Changing the Table.UpdateMode to upWhereKeyOnly


Set the BDE Sybase lang driver to Sybase SQL Dic850 in the BDE.

Hope this Helps

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pegasus100397Author Commented:

 Excellent!!! Although the UpdateWhereKeyOnly didn't work, changing the language driver to "Sybase SQL Dic850" in the BDE solved the problem immediately! It was perviously set to "blank" or none.

I would never have guessed that this was what was causing the goofy TTable behaviour!

With the quality of the answer right up there with the best, I've awarded you 400 points. Thanks!

I am very curious what the Language Driver actually does in the BDE, I can't seem to find any information on it. Can you enlighten the rest of us?

Thanks again for your timely response, my project is now back on track.
I have had this problem randomly for years in my Interbase/Delphi/BDE application.

I tried setting TTable.UpdateMode = UpdateWhereKeyOnly and still I get RECORD/KEY DELETED.
I tried setting BDE Language Driver to "Sybase SQL Dic850" and still I get RECORD/KEY DELETED.

You get no points from me :(

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.