Seriously, why do you reinvent the wheel, badly. It's already been done, by Microsoft. So read up on DBProviderFactories[^] instead. A little on how to use them here[^].
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions