Summary

Visual Basic provides the tools you need to use to ensure that an application’s data is safe— but you need to use those tools. A properly implemented DataSafe function can guarantee that the user’s changes are not accidentally discarded.

By using the events provided by data objects such as the DataTable, you can learn when a value is changing and validate the new value. When all is said and done, constraints on the underlying tables in the database can ensure that the values makes sense, but you can make the application friendlier and more responsive if you catch errors sooner rather than later.

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.