Name Property Is Case-Sensitive

Name Property Is Case-Sensitive

Always be careful when checking adoRS.Fields(i).Name, the stringfor this property is case sensitive. If in a database there’s a field named BANK_BALANCE_AMT,RS.Fields(i).Name will not recognize “bank_balance_amt”: In such a case if you use, for example, IF statement such as:

If myRS.Fields(index).Name=”bank_balance_amt” Then…

you will not get expected results even if in the recorset myRSthere’s a field named “BANK_BALANCE_AMT”. This is false toward RS.Fields([field name]):RS.Fields(“bank_balance_amt”)=RS.Fields(“BANK_BALANCE_AMT”)


Share the Post: