If in a table, some columns occasionally contain null values, then while trying to retrieve the values, the following error is shown:
Conversion from type ‘DBNull’ to type ‘String’ is not valid.
To solve this problem, we can check if the Datareader has a null value for the column, and if yes, then just getting the TextBox to show an empty string.
If DBNull.Value.Equals(dataReader1(“Column_Name”)) Then
TextBox.Text = “”
TextBox.Text = dataReader1(“Column_Name”)
Koders.com is a leading open source code search engine from Black Duck Software. It enables software developers to easily search and browse source code in thousands of projects posted at hundreds of open source repositories.
These guys have a really cool plugin for Visual Studio IDE that lets the developer search for code directly within the IDE without the need of a browser. What’s even more exciting is that as a developer types in the terms, the plugin performs a SmartSearch in the background, identifies results based on the term, and displays them right in the IDE. To further learn about how the SmartSearch works, watch this demonstration video.
You can get the Koders plugin for Visual studio here.
Microsoft today revealed details of Visual Studio 2010 (code-named “Rosario”) and .NET framework 4.0. This next generation ‘Integrated Development Environment’ focuses on the following five points as given in the Visual Studio 2010 webpage.