ITBoard

Welcome to ITBoard Sign in | Join | Help
in
Site găzduit de AXTI
Home Blogs Forums Photos Downloads

Catalin's Blog

Ramblings on the technical world we live on. "Opiniile expuse aici sunt strict ale persoanelor care le publica."

The dummies cookbook for multi database access – Connection strings

The first hurdle to overcome is the myriad of connection strings styles each database type and almost each provider has his dialect.
At the end of the day all these strings in a way or another, have database machine, database name, user, password and a couple of optional parameters depending mostly of the data provider.

Speaking of data providers I categorize them in 2 big kinds: ODBC and native ones. Some database will accept only ODBC ones. And yes, usually at ODBC ones the datasource keeps the database machine and database name at least.

You could, for example, to pass any connection string to the data provider… It could work but how would you know what provider to load? And what happens if I decide to use other provider.
An option would be to have a parser get all the parameters out and provide them as required by the provider. But how about the optional data provider parameters? Well for these we could have a configuration file containing the format of the connection string.
The solution I used was to create a wizard which will collect the connection string parameters and we stored in a universal format (internal invention but could be anything), coupled with a config file documenting the data providers approved to use and some of their characteristics, including the connection string format.  

 

Not to forget the definitive source of information regarding connection strings is http://www.connectionstrings.com/.

 

To summarize the rule is that is no rule but you will need to get around this, and I hope that I have highlighted a bit the options on the table.

Published Friday, October 02, 2009 5:11 PM by MrSmersh

Comments

 

Catalin's Blog said:

Desi aveam in plan WF putin, intimplator am avut kef si inspiratie pentru seria de articole care a adus

October 2, 2009 5:24 PM
Anonymous comments are disabled

This Blog

Syndication

Tags

Home     Blogs     Forums     Photos     Downloads
Copyright © 2007 ITBoard.ro. Toate drepturile rezervate.