I’ve found mention of a data application block existing for ODBC, but can’t seem to find it anywhere. If i didn’t have a copy of the Access DB application block I wouldn’t believe it ever existed either.
Anyone know where to download either the DLL or the code-base from?
–UPDATE: It is NOT included in either the v1, v2, or Enterprise Library versions of the Data ApplicationBlocks
Thanks,
Brian Swanson
Which version of .net are you interested in using the ODBC block on?
The Enterprise library has a Data Access component. It is useful on SQL, Oracle, and ODBC. Just set a different provider name in the .config file
EX:
<add name=”MyConnection” connectionString=”Dsn=Datasource;uid=UserID;pwd=Password”
providerName=“System.Data.Odbc” />
At that point, the data access code is “standardized” and looks identical for SQL, Oracle, and ODBC
EX:
The address for the latest Enterprise Library is:
http://msdn.microsoft.com/en-us/library/cc467894.aspx
This is assuming you are using .net 3x.
Also note that we are using the Exception Handling block in the above code.