System.NotImplementedException Fehler

Ich bin mit ASP.NET 3.5. Ich machte ein Formular, wenn der Benutzer auf eine Schaltfläche klickt, soll es laod eine weitere Seite mit Informationen über Sie. Anstelle des Ladens bekomme ich diese Fehler-Seite:

The method or operation is not implemented. 
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.NotImplementedException: The method or operation is not implemented.

Source Error: 

    public static dsPersonnel GetPersonnel(string p)
    {
       throw new NotImplementedException();
    } 

Source File:    Line: 203 

Ich bin mir nicht sicher, was alles, was ich brauchen würde, um hier posten zu geben, um genügend Informationen für die Hilfe.

Hier ist der code, wo der Fehler sein könnte. Ich denke, ich habe vielleicht etwas deplatziert:

    public clsDataLayer()
    {

    }

    //This function gets the user activity from the tblPersonnel
    public static dsPersonnel GetPersonnel(string Database, string strSearch)
    {
        dsPersonnel DS;
        OleDbConnection sqlConn;
        OleDbDataAdapter sqlDA;

        //create the connection string 
        sqlConn = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;" +
        "Data Source=" + Database);

        string query;
        if (strSearch == "" || strSearch.Trim().Length == 0)
        {
            query = "SELECT * from tblPersonnel";
        }
        else
        {
            query = "select * from tblPersonnel where LastName = '" + strSearch + "'";
        }


        //Defines sqlDA and what each will consist of
        sqlDA = new OleDbDataAdapter("select * from tblPersonnel", sqlConn);

        //Defines DS and what each will consist of
        DS = new dsPersonnel();

        //Outputs the results from the information gathered
        sqlDA.Fill(DS.tblPersonnel);

        //Starts over for a new user
        return DS;
    }

    //This function saves the user activity
    public static void SavePersonnel(string Database, string FormAccessed)
    {
        //Defines the connection to the database
        OleDbConnection conn = new OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;" +
            "Data Source=" + Database);
        conn.Open();
        OleDbCommand command = conn.CreateCommand();
        string strSQL;

        strSQL = "Insert into tblPersonnel (UserIP, FormAccessed) values ('" +
            GetIP4Address() + "', '" + FormAccessed + "')";

        command.CommandType = CommandType.Text;
        command.CommandText = strSQL;
        command.ExecuteNonQuery();
        conn.Close();

    }

    public static dsPersonnel GetPersonnel(string p)
    {
        throw new NotImplementedException();
    }
}
Implementieren Sie die GetPersonnel Methode? Die stub wird standardmäßig wirft eine NotImplementedException, bis Sie tatsächlich implementieren Sie die Methode.

InformationsquelleAutor Mike | 2011-11-15

Schreibe einen Kommentar