SqlHelper problem

M

Mike Fors

Why does the following code error out when there is a null
in the field I'm trying to retrieve? As it stands I need
to check each field for nulls. Anybody know of an easier
way?

SqlDataReader MyDR = SqlHelper.ExecuteReader
(SessionInfo.ConnString, "sp_SctyDetail", sctyid);

SctyDetail MySctyDetail = new SctyDetail();

MySctyDetail.sctypersid = MyDR.GetInt32(1);

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top