System.ArgumentNullException

Discussion in 'ASP.NET 2.0' started by pongourcom1, Dec 5, 2007.

  1. Hi,
    My C# 2005 web application has a dataset with a FillByFirstLastCheckNumber and a GetDataByFirstLastCheckNumber with the code below.</o:p>
    SELECT FirstName, LastName, CheckNumber, TransDate, TaxpayerID, IDType, IDNumber, CheckType, TransAmount, Address, SuiteOrApt, City, State, Zip,MiddleName
    FROM BRecords
    WHERE (FirstName = @firstname) AND (LastName = @lastname) AND (CheckNumber = @checknumber)
    </o:p>
    A Formview uses this GetDataByFirstLastCheckNumber with parameters from a GridView. The related code in a BAL is as follows.
    </o:p>
    [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.</o:p>
    DataObjectMethodType.Select, false)]</o:p>
    public CheckCashReport.BRecordsDataTable GetDataByFirstLastCheckNumber (string firstname, string lastname, string checknumber)</o:p>
    {</o:p>
    return Adapter.GetDataByFirstLastCheckNumber(firstname, lastname, checknumber);</o:p>
    }
    </o:p>
    There are no problems with the GriewView itself.
    </o:p>
    However, when running the application I got this error:
    ??
    this.Adapter.SelectCommand = this.CommandCollection[3];
    if ((firstname == null)) {
    throw new System.ArgumentNullException("firstname");
    }
    else {
    ???.
    Could anybody please help me out?
    Thanks,
    Luc
     

Share This Page