I&#039;m writing an application for some clients that I would like to be as flexible as possible. So, for some clients who don&#039;t have sql server to use, they have to rely on access and therefore the oldebconnection instead of the sqlconnection. I was figuring I&#039;d make a helper class that just returned a connection based off of some internal setting as to whether or not they were using sql like the following.<BR><BR>public static Component GetConnectionObject(){<BR>if (Application["DBType"].ToString() == "SqlServer")<BR>//create sql connection object here to return<BR>else<BR>//create oledb connection object to return<BR>}<BR><BR>Although both oledbconnection and sqlconnection are children of the component class, I don&#039;t know that that is really what I want to return, because I&#039;m then going to have to do a bunch of casting whenever I want to use the object thereby killing any efficiency I was hoping to get from this helper class. Anyone have a better idea how to do this? Thanks.