Comment puis-je résoudre un problème ici. il y a une ligne qui provoque une exception. si le ministère saisi est cette application 'DENTAIRE' a une exception:Exception pour une ligne
"Index Out of Range Exception est été non gérée par le code utilisateur" Il n'y a pas de ligne à la position 0.
BHelper dbHelper = new DBHelper(); /<
string sql = @"select distinct ID from OGEN.SCH_C_RESOURCES /<
where DESCRIPTION='" + deptName + "' AND FIRST_LEVEL_CAT = 'DEPT' and FACILITY_KEY IN('" + StaticStuff.FacilityKey + "','BASE') order by 1"; /<
DataSet ds = dbHelper.DataAdapter(CommandType.Text, sql); /<
if (ds != null && ds.Tables.Count > 0)
{
return Convert.ToInt32(ds.Tables[0].Rows[0]["ID"]);
Que demandez-vous - comment gérer l'exception ou comment la corriger? –