.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘procedure’

Error message when you update a database by using a stored procedure: “System.Data.DBConcurrencyException”

Symptoms
When you use a DataAdapter object to write changes back to a database by means of a stored procedure, you may receive the following error message:

An unhandled exception of type ‘System.Data.DBConcurrencyException’ occurred in system.data.dll
Additional information: Concurrency violation: the UpdateCommand affected 0 records. If the data is not updated correctly, you should receive a DataConcurrencyException exception instead of the above-mentioned error message.
Resolution
This problem can occur if the stored procedure runs the SET NOCOUNT ON statement.

ACC2000: VBA Functions Break in Database with Missing References

Symptoms
If you have a procedure that contains a Visual Basic for Applicationsfunction, and your database contains a reference to a missing objectlibrary or type library, you may receive the following error message whenyou compile your modules or run the procedure:

Compile Error:
Can’t find project or library
Resolution
Your database contains a reference to a database, type library, or objectlibrary that is marked as MISSING: <referencename> in the References dialog box.