I am trying to create an arrayList for each record returned in datareader.. code below:
//create dtr -- conn.open etc...
while(dtr.Read())
{
ArrayList innerAl = new ArrayList();
innerAl.Insert(0, dtr["custId"]);
innerAl.Insert(1, dtr["bookNUMBER"]);
....
outerAl.Add(innerAl);
}
I get error "Invalid attempt to read data, when no data is present. why is that?
Sam
Hi ALL!Your assistance is needed! Can anybody help me create a read/write rowset? Client is Access 2...
By algaliy
when i click on edit button in the grid view, it is suppose to show 2 buttons; update and cancel. ap...
By sambaking
I'm working with a DBase database and I'm having a hard time reading someof the fields use t...
By dandiephouse
I use oracle provider for OLEDB for my conexion.I don't know that I do badThis is my packageCRE...
By ofelia
This is happening at the oncheckchanged event. This code below working good, if any checkboxes is no...
By jaws1021, 5 Comments
i have a datagrid that displays hours entered fot today along with the date, start/finish time for t...
By sneeze024, 3 Comments
Hi Everyone,I am getting problem when i render korean character in Gridview.First thing is I am stor...
By greatnimesh, 4 Comments
Hi, I want to read DataList items values with for loop. Any one tell me please. How to write this?fo...
By programmer_p, 4 Comments
Hi, I'm sort of having a strange problem. I'm dynamically adding checkboxes to rows that are being d...
By rsdim, 13 Comments
Not sure... you can probably check for empty data by using the HasRows property prior to entering the loop, but I see no reason why your logic should fail with that particular error. Could it be that you have already called the Read() method once before the loop? If so, that would cause it. Also check to make sure that "custId" and "bookNUMBER" column names are correct and available.
jcasp | Sat, 05 Jan 2008 10:12:00 GMT |
oh .. I found the error! Always check PostBack..
sdekha76 | Sat, 05 Jan 2008 10:13:00 GMT |