sql - ASP.NET working with Data Sources -
i new asp.net, tasked creating website graph data our customer.
is there way work data pulled datasource in asp.net, before goes table or graph?
i pulled set of data sql database, , need calculate average of 1 of columns plot along data. know can in select statement, trying minimize strain on our sql server queries , put bit more of load onto our web server.
<asp:sqldatasource runat="server" id="nondamped" connectionstring='<%$ connectionstrings:connectionstring %>' providername='<%$ connectionstrings:connectionstring.providername %>' selectcommand="<ommitted>"></asp:sqldatasource>
you can use object of datatable class or dataset class store results select statement. can traverse though data using [row] [column] index properties of objects. eg.
sqldataadapter sda=new sqldataadapter("select query",connectionstring); datatable dt=new datatable(); sda.fill(dt); if(dt.rows.count>0) { int x=convert.toint32(dt.rows[rownumber][columnnumber]); }
Comments
Post a Comment