Server Error in '/' Application.

Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:


Line 261:        '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Line 262:        '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Line 263:        Select Case RS("ModeTarif").ToString
Line 264:            Case "1"
Line 265:                AfficherBien &= "<h3>Tarifs à la semaine</h3>"

Source File: C:\Www\Holiceo\App_Code\SubEtFonctionUtiles.vb    Line: 263

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +185
   General.AfficherBien(Int64 IdBien) in C:\Www\Holiceo\App_Code\SubEtFonctionUtiles.vb:263
   DetailBien.Page_Load(Object sender, EventArgs e) in C:\Www\Holiceo\DetailBien.aspx.vb:14
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975