Board index » delphi » Insufficient key column information for updating or refreshing

Insufficient key column information for updating or refreshing

What is this error I keep getting while using TBetterADODataSet:
Insufficient key column information for updating or refreshing

Mahmood Shafiee Zargar

 

Re:Insufficient key column information for updating or refreshing


Quote
> What is this error I keep getting while using TBetterADODataSet:
> Insufficient key column information for updating or refreshing

Read these:
http://web.orbitel.bg/vassil/ado_resources.htm

HTH
--
Vassil Nazarov
http://web.orbitel.bg/vassil/

Re:Insufficient key column information for updating or refreshing


thanx
I'm reading it.

Quote
"Vassil Nazarov" <vas...@engineer.bg> wrote in message

news:3df1dcc0@newsgroups.borland.com...
Quote
> > What is this error I keep getting while using TBetterADODataSet:
> > Insufficient key column information for updating or refreshing

> Read these:
> http://web.orbitel.bg/vassil/ado_resources.htm

> HTH
> --
> Vassil Nazarov
> http://web.orbitel.bg/vassil/

Re:Insufficient key column information for updating or refreshing


Quote
>What is this error I keep getting while using TBetterADODataSet:
>Insufficient key column information for updating or refreshing

The usual reason is that you do not have a unique key in your table so that ADO
knows which record on the server to update.
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Insufficient key column information for updating or refreshing


Oh! My God!
I am updating a view! How can I have a primary key in a view?

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:3r65vu8a8vj6dlsfcsfjdif9ugap8vm72q@4ax.com...

Quote

> >What is this error I keep getting while using TBetterADODataSet:
> >Insufficient key column information for updating or refreshing

> The usual reason is that you do not have a unique key in your table so
that ADO
> knows which record on the server to update.
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Insufficient key column information for updating or refreshing


You should have unique index or primary key on every table that is affected
by update.

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (LCPI provider, http://www.lcpi.lipetsk.ru) databases.

"Mahmood Shafiee Zargar" <s...@sobh.itgo.com> ????/???? a ?a????
????t??: news:3df2d900@newsgroups.borland.com...

Quote
> Oh! My God!
> I am updating a view! How can I have a primary key in a view?

> "Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
> news:3r65vu8a8vj6dlsfcsfjdif9ugap8vm72q@4ax.com...

> > >What is this error I keep getting while using TBetterADODataSet:
> > >Insufficient key column information for updating or refreshing

> > The usual reason is that you do not have a unique key in your table so
> that ADO
> > knows which record on the server to update.
> > --
> > Brian Bushay (TeamB)
> > Bbus...@NMPLS.com

Re:Insufficient key column information for updating or refreshing


I am also getting the same type of error.
I am using FreDsterWare ADOUpdateSQL object.
This error occurs when one of your field type is Numeric or Decimal.
In my case I am using SQL Server 2K.
My table tblA has following fields.
pknid -> AutoInc (Primary Key).
qty -> Decimal (length 8 scale 3).

I am using stored procedure to update, insert and delete record.

e.g. my update procedure

CREATE PROCEDURE [dbo].[updateTest]

@qtydecimal decimal (8,3), @qtynumeric numeric(8,3), @pknid int

 AS
begin
update tbltest set qtydecimal = @qtydecimal, qtynumeric = @qtynumeric
where pknid= @pknid

end
GO

This fails whenever I try to update a unique record (note: I am passing
pknid to select a record which is unique).
If change the qtydecimal and qtynumeric field type to FLOAT THEN EVERYTHING
WORKS.

Am I doing something wrong.

Sanjay Chavda
India.

Re:Insufficient key column information for updating or refreshing


I have a query (CoCapCV1)  which  join three tables (CapCV1, Clients and
Propietat) and I want edit the query:

SELECT CapCV1.IdCV, CapCV1.IdClientCV, CapCV1.IdPropietatCV, CapCV1.Serie,
Clients.NomFisc, Propietat.NomPropietat
FROM Propietat RIGHT JOIN (Clients RIGHT JOIN CapCV1 ON Clients.IdClient =
CapCV1.IdClientCV) ON Propietat.IdPropietat = CapCV1.IdPropietatCV;

when I insert o delete a record I set CoCapCV1.UniqueTable:=  CapCV1, so
only the insertions or deletions afect to the table CapCV1 (it works fine).
But when I edit the records I set the property CoCapCV1.UniqueTable:=  '',
because I want to see in the controls (dbedit with the fields NomPropietat,
NomFisc) the changes, when it takes place I see the following message:
"Insufficient key column information for updating or refreshing". Somebody
knows how to avoid this. Thanks.

Re:Insufficient key column information for updating or refreshing


I have a query (CoCapCV1)  which  join three tables (CapCV1, Clients and
Propietat) and I want edit the query:

SELECT CapCV1.IdCV, CapCV1.IdClientCV, CapCV1.IdPropietatCV, CapCV1.Serie,
Clients.NomFisc, Propietat.NomPropietat
FROM Propietat RIGHT JOIN (Clients RIGHT JOIN CapCV1 ON Clients.IdClient =
CapCV1.IdClientCV) ON Propietat.IdPropietat = CapCV1.IdPropietatCV;

when I insert o delete a record I set CoCapCV1.UniqueTable:=  CapCV1, so
only the insertions or deletions afect to the table CapCV1 (it works fine).
But when I edit the records I set the property CoCapCV1.UniqueTable:=  '',
because I want to see in the controls (dbedit with the fields NomPropietat,
NomFisc) the changes, when it takes place I see the following message:
"Insufficient key column information for updating or refreshing". Somebody
knows how to avoid this. Thanks.

Re:Insufficient key column information for updating or refreshing


Quote
>when I insert o delete a record I set CoCapCV1.UniqueTable:=  CapCV1, so
>only the insertions or deletions afect to the table CapCV1 (it works fine).
>But when I edit the records I set the property CoCapCV1.UniqueTable:=  '',
>because I want to see in the controls (dbedit with the fields NomPropietat,
>NomFisc) the changes, when it takes place I see the following message:
>"Insufficient key column information for updating or refreshing". Somebody
>knows how to avoid this.

Updating a Join with Jet won't work for any table that you do not include the
unique key fields in the result set.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads