Board index » delphi » Record Not Found No Key speicified

Record Not Found No Key speicified

I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
table connection .  My key field on the table is an autoincrement.  I
can add records fine from my client app but when I apply updates to an
existing record on the table I get an error that says "Unable to find
record, no key specified".  How do I specifiy a key field?

TIA

 

Re:Record Not Found No Key speicified


I figured out how to do my original post.  But now I have a new
problem.  One of my datasets is a joined table and I need to delete a
record.  Using BDE I would use a TUpdateSql to handle this.  How do I
do this with ADO?

TIA

Quote
On Sat, 01 Apr 2000 22:21:30 GMT, e...@foainc.com (Eric) wrote:
>I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
>table connection .  My key field on the table is an autoincrement.  I
>can add records fine from my client app but when I apply updates to an
>existing record on the table I get an error that says "Unable to find
>record, no key specified".  How do I specifiy a key field?

>TIA

Re:Record Not Found No Key speicified


Set the "Unique Table" dynamic property of the ADO DataSet.
Check with MDAC help for details.

HTH

--
V. Nazarov
IT Manager, Sofia Cable

Quote
Eric <e...@foainc.com> wrote in message

news:38e68854.417619254@forums.inprise.com...
Quote
> I figured out how to do my original post.  But now I have a new
> problem.  One of my datasets is a joined table and I need to delete a
> record.  Using BDE I would use a TUpdateSql to handle this.  How do I
> do this with ADO?

> TIA

> On Sat, 01 Apr 2000 22:21:30 GMT, e...@foainc.com (Eric) wrote:

> >I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
> >table connection .  My key field on the table is an autoincrement.  I
> >can add records fine from my client app but when I apply updates to an
> >existing record on the table I get an error that says "Unable to find
> >record, no key specified".  How do I specifiy a key field?

> >TIA

Re:Record Not Found No Key speicified


Thanks for the reply.  I looked at the docs and this is what I need
but I have not been able to figure out where to set this setting.  I
see that TADOQuery has a properties setting but it appears to be
readonly.  Any hints would be appreciated.

On Sun, 2 Apr 2000 03:33:10 +0200, "Vassil Nazarov" <s...@bulnet.bg>
wrote:

Quote
>Set the "Unique Table" dynamic property of the ADO DataSet.
>Check with MDAC help for details.

>HTH

>--
>V. Nazarov
>IT Manager, Sofia Cable

>Eric <e...@foainc.com> wrote in message
>news:38e68854.417619254@forums.inprise.com...
>> I figured out how to do my original post.  But now I have a new
>> problem.  One of my datasets is a joined table and I need to delete a
>> record.  Using BDE I would use a TUpdateSql to handle this.  How do I
>> do this with ADO?

>> TIA

>> On Sat, 01 Apr 2000 22:21:30 GMT, e...@foainc.com (Eric) wrote:

>> >I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
>> >table connection .  My key field on the table is an autoincrement.  I
>> >can add records fine from my client app but when I apply updates to an
>> >existing record on the table I get an error that says "Unable to find
>> >record, no key specified".  How do I specifiy a key field?

>> >TIA

Re:Record Not Found No Key speicified


procedure ADODataSetAfterOpen(DataSet: TDataSet);
begin
  ADODataSet.Properties['Unique Table'].Value:='Name of a table';
end;

--
V. Nazarov
IT Manager, Sofia Cable

Quote
Eric <e...@foainc.com> wrote in message

news:38e790a9.485288187@forums.inprise.com...
Quote
> Thanks for the reply.  I looked at the docs and this is what I need
> but I have not been able to figure out where to set this setting.  I
> see that TADOQuery has a properties setting but it appears to be
> readonly.  Any hints would be appreciated.

> On Sun, 2 Apr 2000 03:33:10 +0200, "Vassil Nazarov" <s...@bulnet.bg>
> wrote:

> >Set the "Unique Table" dynamic property of the ADO DataSet.
> >Check with MDAC help for details.

> >HTH

> >--
> >V. Nazarov
> >IT Manager, Sofia Cable

> >Eric <e...@foainc.com> wrote in message
> >news:38e68854.417619254@forums.inprise.com...
> >> I figured out how to do my original post.  But now I have a new
> >> problem.  One of my datasets is a joined table and I need to delete a
> >> record.  Using BDE I would use a TUpdateSql to handle this.  How do I
> >> do this with ADO?

> >> TIA

> >> On Sat, 01 Apr 2000 22:21:30 GMT, e...@foainc.com (Eric) wrote:

> >> >I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
> >> >table connection .  My key field on the table is an autoincrement.  I
> >> >can add records fine from my client app but when I apply updates to an
> >> >existing record on the table I get an error that says "Unable to find
> >> >record, no key specified".  How do I specifiy a key field?

> >> >TIA

Re:Record Not Found No Key speicified


What was the solution to your original post?

Thanks
P

In article <38e68854.417619...@forums.inprise.com>,

Quote
e...@foainc.com (Eric) wrote:
> I figured out how to do my original post. But now I have a new
> problem. One of my datasets is a joined table and I need to delete a
> record. Using BDE I would use a TUpdateSql to handle this. How do I
> do this with ADO?

> TIA

> On Sat, 01 Apr 2000 22:21:30 GMT, e...@foainc.com (Eric) wrote:

> >I have a MIDAS app server set up using a TADOQuery for an MS SQL 7
> >table connection . My key field on the table is an autoincrement. I
> >can add records fine from my client app but when I apply updates to
an
> >existing record on the table I get an error that says "Unable to find
> >record, no key specified". How do I specifiy a key field?

> >TIA

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads