3
Reply

"SELECT" with disconnected data

ben.kimball

ben.kimball

May 13 2004 5:34 PM
1.7k
Just recently making the move from ASP.OLD to C#-based ASP.NET. From what I've read, with a disconnected DataSet, you can then somehow do the equivalent of a SQL SELECT on the recordset. (If I'm wrong please let me know!) However I cannot find any good info on how that is done. I'm hoping someone can take a look at what I am attemping, and tell me the best way using ADO to do it, as I may be heading in a bad direction. For an example of what I am trying to do: I've got a database table (Geo) with the following: ID: int (Autoindex, primary key) X: int Y: int Home: int The table consists of an X/Y grid of data. While I can do individual queries like "SELECT Home from Geo WHERE X=345 and Y=972" to get an individual value for Home, it's a pretty large grid (1000x1000, a million records), and I'll be accessing "square-shaped" chunks of that data, so I'm thinking it will probably quicker to do a query like: SELECT X,Y,Home FROM Geo WHERE (X BETWEEN 50 and 80) and (Y BETWEEN 200 and 220) Then somehow select from the DataSet using the X & Y values. But I have no idea how to "query" the dataset based on other columns in the dataset. In SQL syntax, doing the following on the DataSet returned above: SELECT Home from DataSet WHERE X=220 and Y=355 Someone with a clue stick, please bash me with it, thanks! :) Also, is there a good way to move the two dimensional data in the dataset into a two dimensional array?

Answers (3)