Black Friday is here! Get up to 30% off on Devart products!
ends in   {{days}}
Days
{{timeFormat.hours}}
:
{{timeFormat.minutes}}
:
{{timeFormat.seconds}}

dotConnect for DB2 Frequently Asked Questions

Couldn't find the answer to your question? Take a look at our discussion forum.


Installation and deployment

I installed dotConnect for DB2 trial, then I have bought and installed purchased version, but something went wrong.

Make sure you had uninstalled the trial version correctly. There should be no old (trial) assemblies present in your system. Uninstall dotConnect for DB2 and check your Global Assembly Cache and local folders for Devart.* assemblies. Remove all Devart.* files and reinstall dotConnect for DB2.



You say, there are sample projects, but I can't find any.

Probably you installed dotConnect for DB2 not in typical mode. Please choose typical when installing dotConnect for DB2. All samples are installed by default in \Program Files\Devart\dotConnect\DB2\Samples folder.


Are there any restrictions for Visual Studio Express editions?

Yes, there are some. First, the provider add-in (and hence menu item) is not available. Second, components are not registered in toolbox automatically (though you can do it manually). Finally, advanced Visual Studio integration (DDEX) is not available, except Microsoft Web Developer Express 2008 and 2010.


How do I deploy my application?

To deploy an application written with dotConnect for DB2, you need to:

  • deploy the Devart runtime assemblies used by your application;
  • include the technical license resource;
  • in case your application uses provider factories, you also need to expose dotConnect for DB2 to the system.

For the detailed description of each of these steps, please refer to the Deployment and Licensing topics in dotConnect for DB2 help.


How to install dotConnect for DB2 on a machine that does not have Visual Studio or Delphi installed?

Select the "Minimal" type when asked by the installer.

I have received a message that Devart.Data is incompatible...

Devart data providers use a common assembly (Devart.Data.dll), so it is necessary to install compatible providers versions. We release our ADO.NET data providers in a single pack, thus releases from the same date should be compatible. Also, Devart data providers should warn you before installation if an incompatible version of Devart.Data.dll was detected.


I have received the following message - "error 0175: The specified store provider cannot be found in the configuration, or is not valid..". What does it mean and what should I do?

You should put the Devart.Data, Devart.Data.DB2, and Devart.Data.DB2.Entity.EF<Version> assemblies in the Bin folder of your application (or place these assemblies in Global Assembly Cache). The <Version> here is the version of Entity Framework used in your application. For Entity Framework v1 the assembly is called Devart.Data.DB2.Entity.EF1.dll, for Entity Framework v4 and v5 it is Devart.Data.DB2.Entity.EF4.dll, for Entity Framework v6 it is Devart.Data.DB2.Entity.EF6.dll. For Entity Framework Core it is Devart.Data.DB2.Entity.EFCore.dll. Make sure that your application is licensed correctly (take a look at the Licensing article for more information).

Please note that there are three versions of Devart.Data.DB2.Entity.EFCore.dll assemblies for different Entity Framework Core versions - 1.1, 2.2, and 3.1. They are located respectively in \Entity\EFCore, \Entity\EFCore2, and \Entity\EFCore3 subfolders of the dotConnect for DB2 installation folder.

Information about provider registering is available in the Deployment article.



Subscriptions and Upgrades

What are the benefits of the dotConnect for DB2 Subscription Program?

The dotConnect for DB2 Subscription Program is an annual maintenance and support service for dotConnect for DB2 users.

Users with a valid dotConnect for DB2 Subscription get the following benefits:

  • Access to new versions of dotConnect for DB2 when they are released
  • Access to all dotConnect for DB2 updates and bug fixes
  • Product support through the dotConnect for DB2 Priority Support program
  • Notification of new product versions

Priority Support is an advanced product support program which offers you expedited individual assistance with dotConnect for DB2-related questions from the dotConnect for DB2 developers themselves. Priority Support is carried out over email and has a two business day response policy.


Can I use my version of dotConnect for DB2 after my Subscription expires?

Yes, you can. dotConnect for DB2 version licenses are perpetual.



Technical Licensing

What is the licensing you use?

dotConnect for DB2 uses .NET component licensing. To build operational application dotConnect for DB2 requires valid license. If no license is available, dotConnect for DB2 does not work.


How to embed license into my application?

Usually you do not have to care about embedding license in your application. When you install dotConnect for DB2 the system is configured so that licensing is done transparently. License is automatically added to project when you place a DB2Connection component onto a form.

In some cases you have to manually add license. It is necessary for console applications, class libraries, and some ASP.NET applications. For instructions on how to add license manually refer to Licensing topic in dotConnect for DB2 documentation.


On opening connection I get an exception saying "License not found...". What should I do?

This generally indicates that license information could not be found, or you try to apply it in some way that does not suit the kind of application. For example:

  • File licenses.licx, required for dotConnect for DB2 to function properly, could not be found.
  • File licenses.licx is not added as embedded resource.
  • File App_Licenses.dll not found in ASP.NET applications.

To fix the problem determine type of your application and read corresponding section of "Licensing" topic.


On opening connection I get an exception saying "License not valid...". What should I do?

This means that license information was found but it is incorrect. It usually happens in the following cases:

  1. The project was earlier compiled with old or trial version of dotConnect for DB2.
  2. File licenses.config used by a class library does not refer to launched executable.
  3. The App_Licenses.dll belongs to other application or needs to be recompiled.
  4. Something's wrong with the operating system or installation of dotConnect for DB2.

If you encounter one of these problems, do the following (the numbers of actions correspond to the numbers of the problems in the above list):

  1. Delete all files from the bin and obj folders and rebuild the project.
  2. Specify the executable in the licenses.config file.
  3. Rebuild App_Licenses.dll for the current application.
  4. Perform the following steps:
    1. uninstall dotConnect for DB2;
    2. remove all Devart.* and policy.*.Devart.* files from the GAC;
    3. clear the Program Files\Devart\dotConnect and Program Files\Common Files\Devart\dotConnect folders;
    4. re-install dotConnect for DB2.

Deployed application worked fine some time, but in some moment it started to say "Sorry, your trial period has expired". But I do not use trial version any more.

Probably you compiled the application with Trial edition of dotConnect for DB2, and deployed it with assemblies from non-trial version. In this case time limit is actual as well. To eliminate the problem just recompile the project.


How to license ASP.NET applications?

To support server-side compilation you ought to have special assembly App_Licenses.dll in the Bin directory of your site. To create this assembly execute Build Runtime Licenses command in the licenses.licx file context menu in the Solution Explorer view. Required assembly will be created automatically.

Note that this is not necessary for precompiled ASP.NET applications (if nothing is compiled on server by user request). Precompiled applications are licensed as usual applications.


How to make dotConnect for DB2 work with SQL Server 2008 Business Intelligence Solutions?

To do this install dotConnect for DB2 on same computer where SQL Server 2008 resides.


I am having problems with the licensing in my project... What am I to do?

If any problems with licensing occurred in your project, you should use the License Information dialog to resolve them. You can access it from the Visual Studio menu: Tools -> DB2 -> License Information.


Do end-users need a license?

No, end-users of your application do not require any license.



Connection pooling

I get exception "Timeout expired. The timeout period elapsed..." What to do?

The full text of the exception is "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." It clearly states that you have run out of connections available. To solve the problem increase Max Pool Sizeconnection string parameter value. The default value is 100. Another way to get extra connections is to clear one or all of the pools. Or you can turn connection pooling off using Pooling connection string parameter.


How to prevent possible pooling problems?

You can clear the pool explicitly. Generally pool is cleared automatically when connections are idle or closed by the server. To force the operation call ClearPool or ClearAllPools methods. Another solution is to disable the pool at all (set Pooling=false in connection string). If this does not help, the problem is not caused by pooling.



Documentation problems

How to open documentation on dotConnect for DB2?

There are several ways to open dotConnect for DB2 documentation:

  • Use appropriate shortcut in start menu, for instance, Start - Programs - Devart dotConnect for DB2 - Documentation .
  • Use command in the IDE: Tools - DB2 - dotConnect for DB2 Help.
  • Position cursor on some class from Devart.Data.DB2 and press F1.

There is also same documentation in chm format. You can download it from our site at the following address: www.devart.com/dotconnect/db2/dcdb2.chm


I can't see the documentation in Visual Studio Help Collection.

Correctly installed documentation appears as separate node in combined collection of Visual Studio and Delphi. If you can't find dotConnect for DB2 node there it is because you enabled topics filtering. To reveal the node set filter to "Devart Documentation" , or "(unfiltered)", or "Visual C#" etc.
Another possible reason is that you installed some IDE after installation of dotConnect for DB2. In this case use aforementioned methods to reach documentation.


All topics in CHM file are blank.

This can happen due to some patches from Microsoft installed on your system. Please read this page to find possible solutions for the problem. In most cases it is enough to right-click on the CHM file, select Properties, click on the "Unblock" button and click "Apply" to show the contents.



Entity Framework

Is Entity Framework supported?

dotConnect for DB2 supports the latest version of ADO.NET Entity Framework.


Where do I start with Entity Framework?

For your convenience there is a brief tutorial that you can use to get acquainted with Entity Framework:


Are there any demo projects to play with?

Yes, dotConnect for DB2 includes several Entity Framework samples in C# and Visual Basic. The samples demonstrate how to use several entities and a relationship between them.



Miscellaneous

I get concurrency error when modifying records using DB2DataAdapter or DB2DataTable. What can be wrong?

This can happen when DB2CommandBuilder generates a query without primary key field. To avoid it use custom update command instead of generated by DB2CommandBuilder. This problem should not take place if primary key field participates in SELECT statement.


No components can be found in the toolbox.

This can happen if the installation encountered some problems. You can add the components to toolbox manually. This procedure is described in the Installation article in the documentation. Note that Microsoft Web Developer Express edition does not allow working with toolbox at all.


dotConnect for DB2 components in Visual Studio 2008 are grey...

Make sure you're in Component Designer view. Do not confuse with Designer view. To switch between views use context menu of .aspx file in Solution Explorer. This relates to Web projects only.


SQL Server Integration Service (SSIS) can't get the list of tables in my DB2 database.

This is an architecture limitation from Microsoft, SSIS understands metadata of SQL Server only. To circumvent this you have to write queries manually.


Can I use dotConnect for DB2 assemblies in the x64 process?

dotConnect for DB2 assemblies are built with the /platform:anycpu option. So, you can use provider's assemblies on any platform (x86 or x64). For more information, refer to https://msdn.microsoft.com/en-us/library/zekwfyz4.aspx