I want to do something like this but don't know how .net gets the datatype
or which type of database connection to use for updating field
======================
strName = vFldname
intType = Cint(objRS(vFldname).Type)
strNewValue = vFldValue
If strName <> "ID" Then 'skip primary key
Select Case intType
Case 2, 3, 4, 5, 6, 17 'number fields
If not IsNumeric(strNewValue) Then strNewValue = Null
Case 11 'yes/no fields
If UCase(strNewValue) = "ON" Then
strNewValue = 1
Else
strNewValue = 0
End If
Case 7,135 'date/time fields
If not IsDate(strNewValue) Then strNewValue = Null
Case Else 'string fields
If Trim(strNewValue) & "" = "" Then strNewValue = Null
End Select
strNewValue = dataPrep(strNewValue)
objRS(strName) = strNewValue
End If