>Essentially Yes - you will need to set up the environment when creating the connection. One option would be to make the query a SP and issue the RAND(-1) there. I usually open the connection in a method so I can consistently set the environment.
Yes, this is what I have as well. I worked a few weeks to set the data provider class. I had to make it generic on the backend so this is why it took a lot of time to handle it quite ok. What I provide what only a sample in order to proceed in this thread and to make sure I have it ok at first before using the class. I will adjust the class however to handle specific CommandText syntax commands independently or before a SQL query.