Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Insufficient key column information for updating or refreshing


Message #1 by "Charles P. Fuller" <cpfuller@o...> on Mon, 9 Dec 2002 13:53:05 -0500
A fellow clipper/dbase dog myself.  The problem is that MSSQL and other SQL
based servers do not keep track of record numbers, so there is no inherent
unique identifier for each record.  If you indent to update some record, and
you intend to this with any SQL based server, then YOU must be certain that
the table you want to update has a unique row identifier AND that you have
provided that information during the row updates.  Otherwise the SQL Server
logic returns the error you reported, essentially asking you which record do
you want  the SQL Server to update?

There are a couple of ways out of this.  You can add an Auto-incrementing
integer column (MS SQL calls it an "Identity Field").  You never change the
value of such fields as they are set during INSERT commands.  Or, you can
compute some unique key and insert that with every INSERT command.  SQL is
built around set concepts, so it has no trouble inserting any number of
identical records, but, if you ever want to update any of these identical
records, you are in trouble.



-----Original Message-----
From: Charles P. Fuller [mailto:cpfuller@o...]
Sent: Monday, December 09, 2002 10:53 AM
To: professional vb
Subject: [pro_vb] Insufficient key column information for updating or
refreshing

I am an old dog (clipper/dbase)trying to learn a new trick
(vb6/SQL/Access) database programming. I get the following error message
whenever I try to update a recordset.

Run-time error '-2147467259(800004005)';
Insufficient key column information for updating or refreshing.

Does anybody have time to coach an old dog.

Thanks
Charles P. Fuller




  Return to Index