Increased database performance

DataDirect''s Connect for .NET allows you to programmatically access the database entirely within the .NET Framework, to simplify database access and boost performance.

There are plenty of products on the market that enable you to manipulate databases programmatically. However, DataDirect's Connect for .NET sets itself apart because it enables you to access the database programmatically, entirely within the .NET Framework. This can be accomplished because the product is written completely in managed code. When you build applications that incorporate Connect for .NET, you can leverage the increased security and performance built into the .NET Framework.

The product's key features include support for Oracle, Sybase, DB2, and SQL Server databases; connection pooling; Microsoft Distributed Transaction Coordination (MS DTC); and existing stored procedures or text queries.

The installation for this product was easy and took roughly five minutes. The assemblies for the data providers are registered automatically in the Global Assembly Cache (GAC). If you decide to install and use MS DTC, the product warns you that it will require calling unmanaged code.

Using Connect for .NET also means you don't have to load the client libraries for each database you support. To start coding, I added a reference for the data provider I wanted to use in my C# VS.NET project and included the namespace in the appropriate source files (see Figure). At that point I was able to connect to the database and manipulate it easily with the ADO.NET accessor functions. As long as you don't change your connection string, you can take advantage of connection pooling. I had to be aware of the data types I retrieved and make sure they matched up with the corresponding type in the data provider. The documentation provides helpful database type/accessor mapping for each database.

When manipulating some of my test databases, I had to tweak some of the settings to get better performance. I increased the size of the connection pool as well as the connection timeout and saw a performance improvement. Some of my selection statements returned a large number of rows so I adjusted the Fetch Array Size attribute to further boost performance. The trace feature was helpful for debugging my stored procedures and text queries.

Although ADO.NET users should have no problem installing and using this product immediately, those unfamiliar with ADO.NET might want to study that technology first. It's a good fit for companies with a defined .NET strategy, because accessing databases through the .NET Framework provides increased security and performance. Developers will need a little time to become familiar with the type mapping between the database and data provider. The technical support on the Web site is good, as is the knowledgebase.

I would like to see actual source code examples shipped with the product so that a user can try it quickly without having to type code. This would require DataDirect to prepare an example for each database supported, but it would be helpful to the user. Developers who implement programs with native code can find cheaper solutions for their database connectivity, but it won't use the .NET Framework. If you're writing all managed code, you'll find this product a good addition to your toolbox for database access.

About the Author

David Mack is a technical lead and consultant for the National Intelligence Division at Titan Systems. He has more than 10 years of experience in management and software engineering. Reach him at [email protected].

comments powered by Disqus


  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot AI has been a boon for developers, but it might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube