Infopath row cannot be located for updating

You should make a point ofexplicitly naming the columns in your select clause so that1) you only retrieve the data you need, and2) you don't force ADO to generate metadata, which sometimes requires anextra trip to the database??? particularly the first chapter(chapter 11, I think)Here is the link again. If yournewsreader is breaking the line, you will need to reassemble the link: would be my preference, except that you must have had some reasonto choose an expensive keyset cursor ...

are you keeping the recordsetopen long enough to cause concerns about concurrency?

use recordset.requery before updation then search that row in data source if found then update it.

better way is use transaction to update the data table then refresh the datagrid Are you using more than just the VB as a front end?

Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S. t=539898 the only thing i can see from those is that it doesnt update the record because there is no promary key shouldnt rs.addnew() deal with that?i have used this method for years and have never had to add a primary key manutally before?I am using VB6 connecting to a SQL Server 2005 database using ADO. Some values may have been changed since it was lastread). Update method I get the error -2147217864 (Rowcannot be located for updating.These issues are ones you would need tohandle yourself if you resorted to a stored procedure. I am not clear how I should handle concurrency issues if I call a storedprocedure to do the update. You should make a point ofexplicitly naming the columns in your select clause so that1) you only retrieve the data you need, and2) you don't force ADO to generate metadata, which sometimes requires anextra trip to the database??? particularly the first chapter(chapter 11, I think)Here is the link again. If your would be my preference, except that you must have had some reasonto choose an expensive keyset cursor ...Do you mean I need to check the Records Affectedvalue, and if it is 0 I should resubmit Re-Excute ? are you keeping the recordsetopen long enough to cause concerns about concurrency?Recordsets, whileinefficient for updating data, do provide good functionality forhandling concurrency issues. I think you should run SQL Profiler to get a trace showing the sqlstatement that generated the error.--Microsoft MVP -- ASP/ASP. The email account listed in my Fromheader is my spam trap, so I don't check it very often.These issues are ones you would need tohandle yourself if you resorted to a stored procedure. You will get aquicker response by posting to the newsgroup. I have changed the query to explicitly naming the columns in theselect clause. With aduse Client, the onlycursor type you will get is static (ad Open Static)Your decision as to cursor type depends on your need for functionality.I am using Lock Typead Lock Optimistic and cursor Type ad Open Keyset. The table it tries to update has an Identity column. This is usually due to a lack of a primary key on the table.I am using Lock Type ad Lock Optimistic and cursor Type ad Open Keyset. If your tabledoes have a primary key, the problem can also be caused by not including theprimary key field(s) in the select clause of the query used to open therecordset. Update method I get the error -2147217864 (Row cannot belocated for updating.The table it tries to update has an Identity column. Post by fniles I am using VB6 connecting to a SQL Server 2005 database using ADO. Some values may have been changedsince it was last read).