By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,734 Members | 855 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,734 IT Pros & Developers. It's quick & easy.

check the field exist or not ?

P: n/a
pKcno = myReader.Item("kcno") <--it will return error when the field
"kcno" doesn't exist

any method to check the field exist or not first , if not exist, I want to
skip the above statement.

Thanks
Dec 20 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Agnes" <sz****@bbs.org.hkwrote in message
news:ec**************@TK2MSFTNGP03.phx.gbl...
pKcno = myReader.Item("kcno") <--it will return error when the field
"kcno" doesn't exist

any method to check the field exist or not first , if not exist, I want to
skip the above statement.

Thanks
Check if its nothing before using it.
If myReader.Item("kcno") is Nothing then
'*** the field doesn't exist
else
' do something creative with it
End If
Dec 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.