|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dataview returns 0 rowsMy 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/Forums.aspx/asp-net/200506/1 Andy Sutorius via DotNetMonster.com wrote:
Show quoteHide quote > Hi, You sure it's called "CodeTable"? try omitting that once.> > 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; > } > Also, you have "CodeTable" and "CodeTables" Which is it? Curt,
Thank you! Misspelling. Ugh! Andy Curt_C [MVP] wrote: Show quoteHide quote >> Hi, >> >[quoted text clipped - 19 lines] >> return CodeView; >> } > >You sure it's called "CodeTable"? try omitting that once. >Also, you have "CodeTable" and "CodeTables" >Which is it? >
Other interesting topics
Do i loose the power of asp.net if i use a custom extension (not .aspx) with IHttpHandlerFactory
what is Request.ServerVariables how to make VS auto suggest properties during dev Newbie on Session State Unable to map the debug start page URL to a machine name User Controls in 2.0 Getting user password from Active Directory Onmouseover Event, Cursor property not working with Netscape or Firefox A really complete list of tools for .Net development another ctp? |
|||||||||||||||||||||||