Hi Chuck,
Base on my experience, "SqlDbType myType = Type.GetType("SqlDbType.int")"
won't work for two reasons.
1) System.Data.SqlDbType.Int isn't a type. System.Data.SqlDbType is a type
(an enumeration) and Int is a member of this enumeration.
2) Type.GetType ("System.Data.SqlDbType") will return null, because the
type lives in System.Data.dll, not mscorlib or the assembly the code will
be running in.We need to specify the full assembly name to get types from
other assemblies.
e.g:
Type.GetType("System.Data.SqlDbType, System.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089");
However, in your case, I think we can use the following statement to get
type "System.Data.SqlDbType.Int".
SqlDbType myType= (SqlDbType)Enum.Parse(typeof(SqlDbType), "Int");
If there is anything unclear, please don't hesitate to contact me.
I'm very glad to work with you.
Sincerely,
WenYuan