RobEmDee Posted April 3, 2003 Posted April 3, 2003 (This isn't an ADO.NET ?, bear with me for a few lines.) I have a relatively complex filtering scenario for a DataView in the app that I am developing which is extremely dynamic. I currently use Class Level Fields (string and integer) in which I capture the different pieces of the Filtering statement across multiple EventHandlers and then compile the DataView.Rowfilter. The ?: In situations like this, when 'placeholders' are needed, is it any less or more efficient or resource friendly to Dim in a new Variable each time the data is captured or is using a Class Level Field and just replacing the value each time ok? Quote
Moderators Robby Posted April 3, 2003 Moderators Posted April 3, 2003 I would stick with local as much as possible. Quote Visit...Bassic Software
RobEmDee Posted April 3, 2003 Author Posted April 3, 2003 Thanks for responding Robby.....is your decision based upon resources sensitivity or keeping the Class functionality simpler? I need to build a Filter based upon selections in three different input Controls, each of which triggers a refiltering after a selection is made. If I declare in Local Variables each time, I will have to pass around a lot of data. My thinking in using Class Level Fields was that I could just set the value and access the Value from any Function/Sub in the Class. This is still a question about the efficiency of reusing variables in general because I will be resetting these values virtually any time the User interacts with the Form. So could you please expand a bit? Thanks. Quote
Moderators Robby Posted April 3, 2003 Moderators Posted April 3, 2003 In that case I would probably make it a Class member. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.