OdbcNetTools - V1.0
Odbc Management Component - Programtically create DSN entries
OdbcNetTools is a library developed to accomplish the following tasks in your Microsoft .Net applications.
This library gives you the flexibility of accomplishing the tasks of "ODBC Data Source Administrator" programmatically. The library has very easy to use interfaces that you can use in any of your .Net applications (Windows or ASP.Net). You will find this library very useful in your setup application where you need to create DSN on the fly.
How to create CreateNewDSN
The following code snippet shows you how to create a new DSN entry for SQL server.[C#]
SqlServerDSNEntry entry = new SqlServerDSNEntry(); entry.Driver = "SQL Server"; entry.Name = "OdbcNetTool_DSN"; entry.Description = "FooBar"; entry.DBName = "Pardesi"; entry.Server = "localhost"; entry.TrustedConnection = false; entry.LogLongQueries = true; entry.QueryLogFile = "C:\\MyQueries.log"; OdbcTools.CreateDSN(DSNTypes.SYSTEM_DSN, entry);[VB]
Sub Main() Dim entry As DBaseDSNEntry = New DBaseDSNEntry() entry.Name = "Reporting" entry.Directory = "C:\\ReportingData" entry.Description = "This is adbase dsn for reporting application" entry.Driver = "Microsoft dBase Driver (*.dbf)" entry.PageTimeOut = 20 entry.DBase5 = False OdbcTools.CreateDSN(DSNTypes.SYSTEM_DSN, entry) End Sub
How to remove existing DSN
The following code shows how you can remove and existing DSN from your system.[C#]
SqlServerDSNEntry entry = new SqlServerDSNEntry(); entry.Name = "OdbcNetTool_DSN"; OdbcTools.RemoveDSN(DSNTypes.SYSTEM_DSN, entry);[VB]
Sub Main() Dim entry As DBaseDSNEntry = New DBaseDSNEntry() entry.Name = "Reporting" OdbcTools.RemoveDSN(DSNTypes.SYSTEM_DSN, entry) End Sub
The other features of this library are demonstrated in the sample files that get shipped with the component.
We give the complete source code for this component when you purchase it. We
will send you the set up programme along with the source after your payment is
Since we give you the complete source for the components, we don not provide any technical support for this component. That does not mean that we will not answer any questions you have regarding the implementation or any topic related to this tool. For queries or question please send us an email at email@example.com