Server Error in '/prebuilt/vCard' Application.

There is no row at position 0.

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.IndexOutOfRangeException: There is no row at position 0.

Source Error:


Line 68: 
Line 69:             //build vcard contents
Line 70:             DataRow rec = myDataSet.Tables[0].Rows[0];
Line 71:             string addr2 = (rec["address2"] == DBNull.Value) ? "" : rec["address2"].ToString();
Line 72:             string sResult = "BEGIN:VCARD\r\nVERSION:3.0\r\n";

Source File: c:\igxsites\BNI_DSS\content\prebuilt\vCard\vcard.aspx.cs    Line: 70

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +125
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   Website.Aspx.MakeVCard.GetMemberVCF(String id) in c:\igxsites\BNI_DSS\content\prebuilt\vCard\vcard.aspx.cs:70
   Website.Aspx.MakeVCard.Page_Load(Object sender, EventArgs e) in c:\igxsites\BNI_DSS\content\prebuilt\vCard\vcard.aspx.cs:36
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0