I believe this question was asked several months back, but i believe my situation is different and the same rules may not apply.
Everytime I execute this method tha
This is very simple ... it means that no results were returned from your query. You always have to code defensively and check to see if the Rows array has any items in it before trying to index into it. Something like:
if (dt.Rows.Count > 0)
soptype = dt.Rows[0]["SOPTYPE"].ToString();
else
somethingWentWrong();