Home > Archive > ASP .NET > June 2005 > Dataview returns 0 rows
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Dataview returns 0 rows
|
|
| Andy Sutorius via DotNetMonster.com 2005-06-10, 4:01 pm |
| Hi,
My dataview is returning 0 rows however I know there are rows in the
dataset with the matching data. Do you see anything wrong with my code. Can
you suggest a way to debug?
Thanks,
Andy
public DataView BindCodeDropDown()
{
SqlConnection oConn = new SqlConnection(DBConnectionString);
SqlDataAdapter dadCode = new SqlDataAdapter("sp_web_835_ddl_code",oConn)
;
DataSet dstCode = new DataSet();
dadCode.Fill(dstCode,"CodeTable");
// return dstCode;
DataView CodeView = new DataView(dstCode.Tables["CodeTables"]);
CodeView.RowFilter="type='F'";
return CodeView;
}
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Fo...sp-net/200506/1
| |
| Curt_C [MVP] 2005-06-10, 4:01 pm |
| Andy Sutorius via DotNetMonster.com wrote:
> Hi,
>
> My dataview is returning 0 rows however I know there are rows in the
> dataset with the matching data. Do you see anything wrong with my code. Can
> you suggest a way to debug?
>
> Thanks,
>
> Andy
>
> public DataView BindCodeDropDown()
> {
> SqlConnection oConn = new SqlConnection(DBConnectionString);
> SqlDataAdapter dadCode = new SqlDataAdapter("sp_web_835_ddl_code",oConn)
> ;
> DataSet dstCode = new DataSet();
> dadCode.Fill(dstCode,"CodeTable");
> // return dstCode;
>
> DataView CodeView = new DataView(dstCode.Tables["CodeTables"]);
> CodeView.RowFilter="type='F'";
> return CodeView;
> }
>
You sure it's called "CodeTable"? try omitting that once.
Also, you have "CodeTable" and "CodeTables"
Which is it?
--
Curt Christianson
site: www.darkfalz.com
blog: blog.darkfalz.com
| |
| Andy Sutorius via DotNetMonster.com 2005-06-10, 4:01 pm |
| Curt,
Thank you! Misspelling. Ugh!
Andy
Curt_C [MVP] wrote:
>[quoted text clipped - 19 lines]
>
>You sure it's called "CodeTable"? try omitting that once.
>Also, you have "CodeTable" and "CodeTables"
>Which is it?
>
--
Message posted via http://www.dotnetmonster.com
|
|
|
|
|