'System.FormatException...........Convert from String to Boolean
Posted on 2004-09-03
I am reading data from a flat file. The data in the field is a 0. I am reading it in as a String value because if the data does not exist, the fill the location with a blank. I then try to covert it to a boolean value but get a system.format problem. What could be causing this problem.
Here is the code
Dim migrant As String
migrant = Val(Mid(strLine, 102, 1))
migrant = Convert.ToBoolean(migrant)