Ok, this one is driving me completely crazy. I have a table in a PostgreSQL database and I'm trying to get the value a boolean column for a specific record with OdbcDataReader.GetBoolean(int col).
The problem is that GetBoolean() keeps throwing a cast is not valid exception even though the same code worked just several days ago. What's even weirder is the same code works fine in another form.
The only change made from the previous working version of my application was adding a column to the table. That said, the index of the column that I need hasn't changed. Oh yeah, getting the value with GetValue() and then calling GetType() on the result returns System.String and the true/false values get translated to 1/0.
I'm all out of ideas.