Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the really universal data links?

In the good old oledb times I used UDL files and the related wizard to check and create connection strings. Nowadays the connection strings you can create this way aren’t that universal any more. The ADO.NET Entity Framework for example creates decorated connection strings which the UDL wizard can’t handle. Is there any tool to create the universal data links of today?

like image 838
Dirk Brockhaus Avatar asked Jan 28 '11 11:01

Dirk Brockhaus


2 Answers

I think there is a difference between:

  • The tool that helps create connection strings (the one that pops up when you double click on the .UDL file). This tool is COM-based and resides in Ole32.dll and is still working.
  • The concept of a connection strings that has never changed. (it's so simple: a list of key/value pair!)

Today's (ie: .NET?) connection strings are not less universal than OleDb connection strings. They are always specific for a given provider. The key/value pairs may not be the same, but the concept is always there.

The UDL tool works using COM objects and can still be used. For example, one could write an extension to the UDL tool for Entity Framework connection strings. Here is a link on the official reference: Provider Extensible Data Link User Interface API

.UDL files are still usable in .NET (with P/Invoke) using IDBPromptInitialize and IDataInitialize OleDb's interfaces, although I agree, it does not seem so natural these days :)

like image 193
Simon Mourier Avatar answered Oct 19 '22 14:10

Simon Mourier


A universal “data link” cannot support all functions of all databases vendors/versions, most software is written in house by corporations to talk to their in house databases, so don’t need to be database independent.

It is harder to code against an API that is not a good match for the functions your chosen database provides as the documentation never seems to match the database you are trying to use.

Microsoft now expect the database vendor to provide the Ado.net data access support for the database, hence the data access tends to be different for each database – but most people don’t care as there code only needs to work with a single database vender.

There are 3rd party options like, devArt's dotConnect and DataDirect that provides a universal “data link” for .net but at a price.

nHibernate will sit on top of most of the venders .net database access layer and hide most of the differences if you are happy to use a ORM.

like image 26
Ian Ringrose Avatar answered Oct 19 '22 14:10

Ian Ringrose