views:

62

answers:

1

Hey,

I have this problem :

[InvalidOperationException: No data exists for the row / column.]
   System.Data.OleDb.OleDbDataReader.DoValueCheck(Int32 ordinal) +1029063
   System.Data.OleDb.OleDbDataReader.GetInt32(Int32 ordinal) +12
   ASP.addsousvoyage_aspx.hdVoyage_SelectedIndexChanged(Object sender, EventArgs e) in C:\Users\ZiGi\Desktop\VisualDesign\addSousVoyage.aspx:222
   System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +111
   System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent() +134
   System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +10
   System.Web.UI.Page.RaiseChangedEvents() +165
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485

When I do this :

MsgBox(myReader1.GetInt32(0).ToString)

Even if :

MsgBox(myReader1.FieldCount) returning 1 as value and the field(0) is integer.

What's the problem ?

+1  A: 

Have you forgotten to do a myReader1.Read()? I think this error can occur when it's forgotten.

becquerel
thank you it's working
ZiGi