Column control datagrid information insufficient key refreshing updating
However the changes made in the Text Boxes are no longer saved to the database during update.Can someone out there explain to me why the database is no longer being updated?I get the error "Insufficient Key Column Information for Updating or Refreshing". I am prepared to actually change the data under the covers by writing extra code to do that, but I need to be able to have the user change data on the form and then when they want to change records, I want to update the table data with their changes and then move to the next record. I next decided to isolate the problem down to the smallest number of fields possible. I could either leave out the reference to the foreign key in the SELECT section of my SQL statement, like so: SELECT Table1. After playing with cursor settings for awhile, I discovered it wasn't a cursor problem. Sub Description FROM Table1 INNER JOIN Table2 ON Table1. Item ID; I was able to eliminate the problem in two different ways. I did expect some complexity because the SQL has some joins in it with tables/fields that have a one to many relationship with some fields in my adodc record, but I thought I could trap and handle the error. What I discovered is that the problem was occurring because the foreign key in my many table had the same name as the primary key in my one table (a common practice). I next decided to isolate the problem down to the smallest number of fields possible. I could either leave out the reference to the foreign key in the SELECT section of my SQL statement, like so: SELECT Table1. This is all a shot in the dark because I don't use bound controls much. or if you do have multiple firstname fields in your SQL statement, give them distinct names using the SQL keyword 'AS'.When I run the same SQL from Access itself, I am able to update some fields in the QUery, but not the ones that would update the "one" of the table. Maybe you can only use an ADODC based on a single table? So, for example, my SQL statement looked like this: SELECT Table1. What I discovered is that the problem was occurring because the foreign key in my "many" table had the same name as the primary key in my "one" table (a common practice).
By the way, you mention that you don't use bound controls much. Do you just find it easier to stuff the values into the controls yourself or is it better performance? Later when I want to update 2 fields, I am encountering and error "Insufficient Key column for updating or refreshing."?