Concurrency violation Problem [modified]
-
I have a problem with my application.I have created a connection with an Access database using wizard.and i have a form with some buttons to add , delete and modify records.Bu some time ( !! Not always ) an error is generated : --Concurrency violation the update command affected o of the expected 1 records--. I can do many operations add , delete , update ..etc and everything is ok , some time i get this error. Please help me ! Modified : I found that the error is generated always if i add a record and then i try to deleted. ( but the error is generated in other situations too, but not always) -- modified at 21:03 Thursday 9th August, 2007
-
I have a problem with my application.I have created a connection with an Access database using wizard.and i have a form with some buttons to add , delete and modify records.Bu some time ( !! Not always ) an error is generated : --Concurrency violation the update command affected o of the expected 1 records--. I can do many operations add , delete , update ..etc and everything is ok , some time i get this error. Please help me ! Modified : I found that the error is generated always if i add a record and then i try to deleted. ( but the error is generated in other situations too, but not always) -- modified at 21:03 Thursday 9th August, 2007
Hi, There is many possiblity of problems/bugs in ur connecting n disconnecting. 1st thing is the ms access is using by some other process Or the db file driver may be NTFS format Or the system may have virues that accesing ur db. Many of the programmers mistake it to forgot to close the connections.. It is the best to use try... catch.. i.e, Try Open() (coding....) Catch ex As Exception Finally connect.close() End Try Try this code.. N Pls reply me wat u get
Senthil S Software Engineer
-
Hi, There is many possiblity of problems/bugs in ur connecting n disconnecting. 1st thing is the ms access is using by some other process Or the db file driver may be NTFS format Or the system may have virues that accesing ur db. Many of the programmers mistake it to forgot to close the connections.. It is the best to use try... catch.. i.e, Try Open() (coding....) Catch ex As Exception Finally connect.close() End Try Try this code.. N Pls reply me wat u get
Senthil S Software Engineer
thank you i try but the problem is the same. ( i'm using DataAdapter update method) The problem is only when i add new record and after i try to modify or delete the new record. if i close the form after adding new record and open again and try to modify or delete the record everything is ok. only my program is accessing the database , and there is no virus on my computer. -- modified at 10:12 Friday 10th August, 2007