Print Thread
Errormessage 'Unable to find record. No key specified'
#7172 02/09/05 04:12 PM
Joined: Dec 2004
Posts: 4
M
molgev Offline OP
Member
OP Offline
Member
M
Joined: Dec 2004
Posts: 4
I have a problem while trying to update my database. I receive the above errormessage.

This is my situation:

ServerApp with OracleDataset with a TDatasetprovider linked to it. The UpdateMode of this provider is set to upWhereKeyOnly.

ClientApp using a TSocketConnection to attach to the server. A TClientdataset is linked to TDatasetprovider of the server. There's a persistent fieldobject 'ID' of which Providerflags pfInkey set.

Any time I try to update the database I receive the above errormessage.

Anyone has a solution to this problem?

Re: Errormessage 'Unable to find record. No key specified'
#7173 02/09/05 10:30 PM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
The pfInKey flag you mentioned is set in the TOracleDataSet field?


Marco Kalter
Allround Automations
Re: Errormessage 'Unable to find record. No key specified'
#7174 02/10/05 01:18 PM
Joined: Dec 2004
Posts: 4
M
molgev Offline OP
Member
OP Offline
Member
M
Joined: Dec 2004
Posts: 4
The pfInkey is set only in the TClientDataset of the clientapp.

Re: Errormessage 'Unable to find record. No key specified'
#7175 02/10/05 02:20 PM
Joined: Dec 2004
Posts: 4
M
molgev Offline OP
Member
OP Offline
Member
M
Joined: Dec 2004
Posts: 4
I think I solved the problem:
I have used the UniqueFields-property of the TOracleDataset to identify the ID-field. It seems to work this way.

There's one thing I don't understand. The n-tier demo delivered with DOA does not use this UniqueFields-property.
With this demo updating is no problem. I checked all the properties in the demo and compared them to the properties in my project.
So there must be another possible solution to the problem. Any idea?

Re: Errormessage 'Unable to find record. No key specified'
#7176 02/10/05 08:52 PM
Joined: Aug 1999
Posts: 22,204
Member
Offline
Member
Joined: Aug 1999
Posts: 22,204
You need to set pfInKey for the ID field in the TOracleDataSet instead of the TClientDataSet.


Marco Kalter
Allround Automations
Re: Errormessage 'Unable to find record. No key specified'
#7177 02/11/05 04:03 PM
Joined: Dec 2004
Posts: 4
M
molgev Offline OP
Member
OP Offline
Member
M
Joined: Dec 2004
Posts: 4
Thanks it works.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.062s Queries: 14 (0.008s) Memory: 2.5161 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-04-25 22:41:02 UTC
Valid HTML 5 and Valid CSS