Mercypoint
Weaksauce
- Joined
- Oct 22, 2005
- Messages
- 74
Hi,
I'm trying to "force feed" my class from the database. I have a class with properties that is exactly named as a table column names expect for in the class, it is camel cased and in the database, it is all caps.
My problem is that I can't get the Bindingflags.IgnoreCase to work for me.
propInfo will always return a Nothing because the case do not match. Am I missing something?
Thanks
I'm trying to "force feed" my class from the database. I have a class with properties that is exactly named as a table column names expect for in the class, it is camel cased and in the database, it is all caps.
My problem is that I can't get the Bindingflags.IgnoreCase to work for me.
Code:
Dim propInfo as PropertyInfo
Dim columnName as String
For i as Integer = 0 To datatable.columns.Count -1
columnName = datatable.columns.item(i).columnName
propInfo = oType.GetProperty(columnName, BindingFlags.IgnoreCase)
propInfo will always return a Nothing because the case do not match. Am I missing something?
Thanks