I am trying to convert string values ββto SqlDbType. My code is able to hide the "Text" in SqlDbType.Text without any errors, but when I try to convert the "bit" to SqlDbType.Bit, I get the following error: "Required value" bit "not found".
The same thing happens when trying to convert "int" to SqlDbType.Int Error Message: "The requested value" int "was not found."
Why does this work for βtextβ but not βbitβ or βintβ?
Dim MyType as String = "bit" Dim sdtype As SqlDbType sdtype = DirectCast([Enum].Parse(GetType(SqlDbType), MyType), SqlDbType)
source share