Solved

Record/Key Deleted - Driving me batty!

Posted on 1998-05-20
8
708 Views
Last Modified: 2008-02-01
I have a table in SQL Server 6.0 hooked to a TTable Component defined as:

CP_Counterparty
CP_Description

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!
Pegasus
0
Comment
Question by:Pegasus100397
8 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1346820
Do use TQuery or TTable?
0
 
LVL 3

Author Comment

by:Pegasus100397
ID: 1346821
Edited text of question
0
 
LVL 3

Author Comment

by:Pegasus100397
ID: 1346822
Adjusted points to 256
0
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
LVL 1

Expert Comment

by:ssite
ID: 1346823
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...
0
 
LVL 3

Author Comment

by:Pegasus100397
ID: 1346824
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 ;^)

Pegasus
0
 
LVL 1

Accepted Solution

by:
RJENKINS earned 400 total points
ID: 1346825
Try Changing the Table.UpdateMode to upWhereKeyOnly

and/or

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

Hope this Helps
RCJ
0
 
LVL 3

Author Comment

by:Pegasus100397
ID: 1346826
RCJ,

 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.
Pegasus
0
 

Expert Comment

by:JonathanElkins
ID: 32707554
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 :(

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ddeman not working in activex 3 103
select query - oracle 16 100
TServerSocket - file via sendbuf or Text via sendtext ? 1 54
How to Get Images From Server using App Tethering 11 29
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question