|
-
August 27th, 2009, 07:33 AM
#4
Re: Conversion error
Does your data grid view cell value return DBNull sometimes, so that you crash on the Replace function.
You can use
QryColSentDataGridView.Rows(irow).Cells(2).Value.ToString()
It's because DBNull.Value.ToString() is equal to empty string ("")
However, this will lead to another error when the Value is NOTHING, it's because NOTHING cannot ToString()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|