Phew. Yesterday I gave a whole day about ADO.Net to a group of fine young people, and today I gave about an hour more about ADO.Net best practices. Boy am I tired.
I found out that after about 3 hours of speaking my voice starts to fade. Obviously I'm not speaking correctly. I know that there are techniques that allow you to speak a lot and not lose your voice even a bit. Anyone know of any?
Anyway, One of the things I talked about today was about connection pooling. I got a question about what happens when a connection string is used to connect to the database via a different user (using SSPI), yet the connection string is the same(Connections are pooled based on an exact connection string match). I didn't know the answer to that, so I checked. Turns out that when different users log in, even with the exact same connection string, they do not share the same pool. therefore, it is less efficient to use multiple accounts to access the database, as multiple connection pools will be created for them.
Go here to learn a little more about the subject of connection pools.
I also talked about using the Data Access Application Block, versions 2.0 and 3.0. It was very cool to look at people's faces when they saw 8 lines of data access code to fill a dataset turned magically into one simple line. Very nice. I found this very nice article that talks about how the DAAB v.3 works and operates, including how it uses the Abstract Factory pattern to do its bidding, allowing you to blindly use different and configurable data providers.
I also got a question about that issue which I could not answer. The question was, given that with the data access block v.3 you get 3 pre-made data providers - Sql,OleDb and Oracle, is there an oracle implementation somewhere for this application block? (i.e 'that inherits from AdoHelper class')
I asked some of the people here and someone said they somewhere that yes, there is, but looking this up in google found nothing. The article I'm linking to here, by Maxim Karpov states :
“Unfortunately, there is no implementation for Oracle database; therefore, it is up to you to develop the support for this database if needed. It is as simple as inheriting from AdoHelper class and overriding the method with Oracle specific functionality”
Too bad. I bet someone somewhere did create such an implementation. Do you know of any?
One thing I forgot to mention was that just before my talk one of the guys from the crowd approached me, I've never seen him before, and said he's been reading my blog for a long time and that its nice to finally meet me. (Sorry, I can't remember your name! please post a comment so that I can correct this wrong) Sure made me feel good all over.