Est-ce que quelqu'un a deja rencontre une erreur pareille ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 cvid
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: CVID

Source Error:

Line 55:         protected virtual CVDetails GetCVsFromReader(IDataReader reader, bool readBody)
Line 56:         {
Line 57:              CVDetails cv = new CVDetails(
Line 58:                 (int)reader["CVID"],
Line 59:                 reader["FirstName"].ToString(),


Source File: c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\KoeinProject\App_Code\DAL\CVsProvider.cs    Line: 57

C'est le code qui contient la ligne d'erreur :


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
        protected virtual CVDetails GetCVsFromReader(IDataReader reader)
        {
            return GetCVsFromReader(reader, true);
        }
        protected virtual CVDetails GetCVsFromReader(IDataReader reader, bool readBody)
        {
             CVDetails cv = new CVDetails(
                (int)reader["CVID"],
                reader["FirstName"].ToString(),
                reader["MiddleName"].ToString(),
                reader["LastName"].ToString(),
                reader["DateOfBirth"].ToString(),
                reader["PlaceOfBirth"].ToString(),
                reader["NationalityAtBirth"].ToString(),
                reader["MaritalStatus"].ToString(),
                reader["Sex"].ToString(),
                null,
                reader["Education"].ToString(),
                reader["Address1"].ToString(),
                reader["Address2"].ToString(),
                reader["ExpectedSalary"].ToString(),
                reader["CareerObjective"].ToString(),
                reader["AvailabilityForWork"].ToString(),
                reader["PhoneNumber"].ToString(),
                reader["Languages"].ToString(),
                reader["ComputerSkills"].ToString(),
                reader["ImageURL"].ToString());
 
 
            if (readBody)
                cv.Experience = reader["Experience"].ToString();
 
            return cv;
        }