Better way of iteration
-
hi there, I have a collection of record in a data table which is populated from a dataset. I would like to replace some field values in that data table. This replacement is temporary (I am not going to update it back to database or dataset). Eg: EmpID EmpName 1101 My Name 1102 Your Name What I need to do is, I need to replace all "Emp ID" values to it's corresponding encrypted value. Answer will be EmpID EmpName xabc My Name ssbc Your Name Now I am iterating through individual records of my data table and updating with my required value. The iteration took little more time, when I deal with lot of records. Is there any better way to achieve my result.:-O Sreejith Nair [ My Articles ]
-
hi there, I have a collection of record in a data table which is populated from a dataset. I would like to replace some field values in that data table. This replacement is temporary (I am not going to update it back to database or dataset). Eg: EmpID EmpName 1101 My Name 1102 Your Name What I need to do is, I need to replace all "Emp ID" values to it's corresponding encrypted value. Answer will be EmpID EmpName xabc My Name ssbc Your Name Now I am iterating through individual records of my data table and updating with my required value. The iteration took little more time, when I deal with lot of records. Is there any better way to achieve my result.:-O Sreejith Nair [ My Articles ]
Are you using SQL server or Access or ?? can your Encryption code be ported to Transact-SQL? If so I would simply create a function that encrypts your values and run it at the server and represents it in a view.
'Cause I'm living on things that excite me, be it pastries or lobsters or love...
I'm just trying to get by, being quiet and shy, in a world full of push and shove... Jimmy Buffett - The Wino and I know -
Are you using SQL server or Access or ?? can your Encryption code be ported to Transact-SQL? If so I would simply create a function that encrypts your values and run it at the server and represents it in a view.
'Cause I'm living on things that excite me, be it pastries or lobsters or love...
I'm just trying to get by, being quiet and shy, in a world full of push and shove... Jimmy Buffett - The Wino and I knowNot at all possible. I can't ship the encription algoritham with T-SQL. Sybase is the database. Sreejith Nair [ My Articles ]
-
hi there, I have a collection of record in a data table which is populated from a dataset. I would like to replace some field values in that data table. This replacement is temporary (I am not going to update it back to database or dataset). Eg: EmpID EmpName 1101 My Name 1102 Your Name What I need to do is, I need to replace all "Emp ID" values to it's corresponding encrypted value. Answer will be EmpID EmpName xabc My Name ssbc Your Name Now I am iterating through individual records of my data table and updating with my required value. The iteration took little more time, when I deal with lot of records. Is there any better way to achieve my result.:-O Sreejith Nair [ My Articles ]
If you're not going to update the database with the new values, why bother putting the values in the dataset? You could use some kind of intrinsic data object to the language you're using. Such as an array or a collection.
using System.Beer;
-
If you're not going to update the database with the new values, why bother putting the values in the dataset? You could use some kind of intrinsic data object to the language you're using. Such as an array or a collection.
using System.Beer;
I want to use all methods which normally offered by dataset and data table. This is the main reason that, i am keeping all values in DataTable. Now do you think arraylist is good enough ? Sreejith Nair [ My Articles ]
-
I want to use all methods which normally offered by dataset and data table. This is the main reason that, i am keeping all values in DataTable. Now do you think arraylist is good enough ? Sreejith Nair [ My Articles ]
Well you've answered your own question. If updating the dataset is too slow, then you need to do it a different way.
using System.Beer;