Hi Friends,
There is no row at position 0 Error
here it is my code..
[code=cpp]
string q="select * from Masters where deptno="+deptno ;
dataset ds=new datset();
sqldataadapter da=new sqldatadapter(q , conn);
da.fill(ds,"fil l");
listviewitem list=null;
foreach(datarow dr in ds.tables["fill"].rows)
{
list=new lisviewitem(dr. rows["empno"].tostring());
listview.items. add(list);
list.subitems.a dd(dr.rows["empname"].tostring())
}[/code]
In masters tables row values r ther.
deptno, empno emname
1 100 u
2 200 k
3 null null
4 null op
if i select deptno 1 values r retrived...if i select deptno 3 then tht error exists
Please me how to solve the problem. I think everbody understood
There is no row at position 0 Error
here it is my code..
[code=cpp]
string q="select * from Masters where deptno="+deptno ;
dataset ds=new datset();
sqldataadapter da=new sqldatadapter(q , conn);
da.fill(ds,"fil l");
listviewitem list=null;
foreach(datarow dr in ds.tables["fill"].rows)
{
list=new lisviewitem(dr. rows["empno"].tostring());
listview.items. add(list);
list.subitems.a dd(dr.rows["empname"].tostring())
}[/code]
In masters tables row values r ther.
deptno, empno emname
1 100 u
2 200 k
3 null null
4 null op
if i select deptno 1 values r retrived...if i select deptno 3 then tht error exists
Please me how to solve the problem. I think everbody understood
Comment