Validating for empty datafields
Hi I got a problem whereby my boss has failed to maintain the AS400 server's database. This means that I will have field "elrsnc" being empty and causing major problem to my work.
Elrsnc is suppose to represent a value of 1-11. So base on the selected value i will insert a strFieldName (example value 1, strFieldname ="XRSN01") into another table empexit. My problem is if Im running my codes as of those below, how should I validate for rsCode.Fields("elrsnc") = ""
sql2 = "select empno, edcode, elyyyy, elmm, eldd, elrsnc from EMPloyee " & _
"where empno = '" & empno & "'"
rsCode.Open sql2, cn, adOpenKeyset, adLockOptimistic
intELRSNC = CInt(rsCode.Fields("elrsnc"))
Select Case intELRSNC
Case 1: strFieldName = "XRSN01"
Case 2: strFieldName = "XRSN02"
Case 3: strFieldName = "XRSN03"
Case 4: strFieldName = "XRSN04"
Case 5: strFieldName = "XRSN05"
Case 6: strFieldName = "XRSN06"
Case 7: strFieldName = "XRSN07"
Case 8: strFieldName = "XRSN08"
Case 9: strFieldName = "XRSN09"
Case 10: strFieldName = "XRSN10"
Case 11: strFieldName = "XRSN11"
End Select