sql exception was unhandled by user code

May 12 2011 1:22 AM
 
Whatz wrong with below code??? im getting  'sql exception was unhandled by user code' exception..

Why im am getting this??


public DataSet GetInterestData(DateTime dtSaleDate)
    {
        Database database = DatabaseFactory.CreateDatabase(CTBConnectionString);
        DbConnection con = database.CreateConnection();
        DbCommand command1 = database.GetStoredProcCommand("spGetInterestCalculationValue");

        database.AddInParameter(command1, "@TransferDate", DbType.DateTime, dtSaleDate);

        return database.ExecuteDataSet(command1);
    }


Answers (4)