problem with DataReader ASP.NET (Visual Basic)

Posted by ZiGi on Stack Overflow See other posts from Stack Overflow or by ZiGi
Published on 2010-05-28T12:01:25Z Indexed on 2010/05/28 12:01 UTC
Read the original article Hit count: 230

Filed under:
|
|

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 ?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about visual-basic