Professional Excel Development (2nd edition) XL-Dennis on VSTO/.NET & Excel Copyright © 1989 - 2010 XL-Dennis

Home : Create connection strings to databases with .NET Connection
Q10227 - INFO: Create connection strings to databases with .NET Connection

Introduction 
.NET Connection is a new free .NET based tool for MS Excel to create and store connection strings in to a various number of databases and to other sources. This is my first public free .NET based tool for MS Excel and it will be followed by additional tools based on the .NET technology in the future.

It can create connection strings with both the Data Link Wizard as well as with the .NET Data Link Wizard. The .NET Data Link Wizard provides us with access to .NET Framework Data Providers to create connection strings with. These Data Providers are not available through the Data Link Wizard.

To store and handle the connection strings it uses a Microsoft Database (aka Access database). It may appear as an ‘overkill’ but in the future it will also handle additional data of different types.

Per se it is a COM Add-in which has been developed and deployed with Add-in Express 2007 for Microsoft .NET. It is also an update of my free ADO Connection Add-In for Excel.

Important: This tool has a limitation of storing connection string with 255 characters. If you experience this limitation the please use .NET Co Library instead.

Requirements & Installation 

Requirements:

  • Excel 2000, 2002, 2003 or 2007
  • .NET Framework 2.0 and higher
  • Windows 2000 SP-4, Windows XP SP-2 or Windows Vista
  • (The option “Trust access to the VBA Project object model” must be checked - I still prefer that this is done by the owners of the computers then changing it through Windows Registry - code of ethics )

The package has intentionally been kept simple and clean. It does not check if the above requirements are met or not.

Using .NET Connection Tool
After the installation of the tool a new item has been added to the menu in the VB Editor as the following screenshot shows:

 

When selecting the command .NET Wizard it starts with the following dialogform:

 

In the next step the following dialogform is showed:


 

The following dialogforms are similar to both Wizards which make it possible to store the created connection string with a unique name:

 

 

Please also see the startpage at MSDN for .NET Data Providers

Special note:
The .NET Connection Tool is provided “AS IS” and with no liabilities from Dennis Wallentin or XL-Dennis.

Related Articles
No Related Articles Available.

Article Attachments
netconnectionsetup.msi

Related External Links
No Related Links Available.
Created on 2007-06-18.
Last Modified on 2007-12-01.
Last Modified by Dennis Wallentin.
Article has been viewed 4150 times.
Print Article
Email Article