Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking DataSet
Message
 
To
13/02/2003 21:13:43
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00749790
Message ID:
00753044
Views:
18
Bonnie,

The current number of rows I have now is 65,000 + somthing !!!.

And in this case the user will loss the feature of moving "Next" & "Back" in the dataset, and replace it with the SELECT statment to point directly to the wanted row.

But, my point is... in old languages and even VB6, they had SEEK method to search for any indexed column, and FIND method for not indexed columns, in .NET I don't see any advandate in keeping only .FIND method and limit it to work only with PK!!




>Ahmad,
>
>Your database table may have 70,000 rows, but I doubt that you will have that many rows in your DataSet!! If so, you need to make your DataSet a bit smaller with a WHERE clause in your SELECT. There's no way the UI should be handling that many rows.
>
>~~Bonnie
>
>
>>Bonnie,
>>
>>I think your code goes and search row by row, correct?
>>So, what if my database table have 70,000 row's !!, the system will be very slow.
>>Correct or I am missing something here?
>>
>>
>>
>>>Ahmad,
>>>
>>>You could write your own find method, something like this (untested code):
>>>
>>>
>>>public DataRow MyFind(DataTable MyTable, string ColumnName, object ColumnValue)
>>>{
>>>  for (int i=0; i < MyTable.Rows.Count; i++)
>>>  {
>>>    if (MyTable.Columns.Contains(ColumnName) && MyTable.Rows[i][ColumnName] == ColumnValue)
>>>      return MyTable.Rows[i];
>>>  }
>>>  // if none found, return a blank row.
>>>  return new DataRow();
>>>}
>>>
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>Hi Jayesh,
>>>>
>>>>Regarding the Find() method, I works only with PK's, what if I want to search for some data in not a PK column, .Find will not work...
>>>>
>>>>Select statment with Where clause is only the choise ??
>>>>
>>>>
>>>>
>>>>
>>>>>DataRowCollection has Find() method. You can do something like this:
>>>>>
>>>>>
myDataSet.Tables[myTable].Rows.Find(CustomerId);
>>>>>
>>>>>>Dear All,
>>>>>>
>>>>>>Is there a way to seek the DataSet (ADO.NET) like old ADO?
>>>>>>if not how to find records, is't by using sql commands only?
>>>>>>
>>>>>>Thanks for the help
<><><><><><><><><><><><><><><><><><><><>
<><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
<><><><><><><><><><><><><><><><><><><><>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform