
June 13th, 2001, 02:33 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
HELP with dataviews
<i><b>Originally posted by : Wayne (wayne0h@hotmail.com)</b></i><br />Can anyone help me?<br /><br />I have a .vb file which queries a database and successfully returns some data in a dataset; it binds to a datagrid and displays just fine using the defaultview; and when I check the rowcount of the defaultview like so: <br /><br /> response.write(dsAirports("airports").defaultview.Rows.Count.tostring())<br /><br />it is OK...Everything works fine until I try to create a new dataview out of this table so that I can sort by one of the columns like so:<br /><br /> dim mydataview as dataview<br /> mydataview = new dataview(dsAirports("airports"))<br /> mydataview.sort = "City ASC"<br /><br />now I get basically an empty recordset; when I bind it to a datagrid I get nothing, and when I check the count property like so: <br /><br /> response.write (mydataview.count.tostring())<br /><br />I get zero.<br /><br />What am I doing wrong??<br /><br />Any help would be greatly appreciated,<br /><br />Wayne<br />
|