dotConnect Universal Frequently Asked Questions

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

What is the difference between Standard and Professional version?

The main difference is that the Professional Edition includes some additional tools that save you time and effort. The following list briefly enumerates the main advantages of the Professional Edition.

  • Bundled Devart data providers for accessing Oracle, MySQL, PostgreSQL, and SQLite servers without additional software.
  • Support for dbMonitor to perform per-component tracing of database events such as SQL statement execution, commit, rollback, etc.
  • DataSet Wizard for greatly simplifying the process of generating datasets in your application.
  • Enterprise Library support for taking advantage of Data Access Application Block functionality.
  • ASP.NET 2.0 Provider Model support for using dotConnect Universal as one of the ASP.NET 2.0 providers.

So, the Professional Edition allows you to work much more efficiently and use more technologies. To try out this functionality, use the Trial version, which incorporates all the enumerated features.



Installation and deployment

I installed dotConnect Universal 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 the Data Provider and check your Global Assembly Cache and local folders for Devart.* assemblies. Remove all Devart.* files and reinstall dotConnect Universal.


How do I upgrade to a newer version of dotConnect Universal?

Close all running IDEs and help collections, then run the installation package of the newer version. You will be prompted to uninstall the previous version; agree and then proceed to installing the newer build.


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

Probably you installed dotConnect Universal not in typical mode. Please choose typical when installing dotConnect Universal. All samples are installed by default in \Program Files\Devart\dotConnect\Universal\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 Universal, 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 Universal to the system.

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


How to install dotConnect Universal on machine that does not have Visual Studio .NET or Delphi installed?

Choose "Minimal" type when asked by the installer.



Technical Licensing

What is the licensing you use?

dotConnect Universal uses .NET component licensing. To build operational application dotConnect Universal requires valid license. If no license is available, dotConnect Universal does not work.
Note that if you use other Devart data providers, they require valid license as well, unless you use the bundled providers with the Professional Edition of dotConnect Universal.


How to embed license into my application?

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

You may be required to add license manually. It is necessary for console applications, class libraries, some ASP.NET applications and existing projects initially built with dotConnect Universal version 1.00. For instructions on how to add the license manually refer to Licensing topic in dotConnect Universal help.


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 Universal 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 the "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 Universal.
  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 Universal.

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 Universal;
    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 Universal.

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 Universal, 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.


Do end-users need a license?

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



Connection pooling

I call UniConnection.Open(), then Close(). Physical connection is still visible by server. Isn't it a bug?

No, it is not. This is Connection Pooling feature. Actual connection is not closed in order to be used later by your application. This boosts performance greatly.


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 Size connection 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 the pool is cleared automatically when connections are idle or closed by 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 Universal?

There are several ways to open dotConnect Universal documentation:

  • Use appropriate shortcut in start menu, for instance, Start - Programs - Devart dotConnect Universal - dotConnect Universal documentation .
  • In the IDE choose Universal -> dotConnect Universal Help from the Tools menu.
  • Position cursor on some class from Devart.Data.Universal 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/universal/dcuniversal.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 Borland Delphi. If you can't find dotConnect Universal 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 Universal. 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.



Miscellaneous

Are there any compatibility limitations in the Mobile Edition of dotConnect Universal?

Yes, the Mobile Edition of dotConnect Universal can work only with the following servers: Oracle, SQL Server, MySQL, PostgreSQL.


I get concurrency error when modifying records using UniDataAdapter. What can be wrong?

This can happen when UniCommandBuilder generates a query without primary key field. To avoid it use custom update command instead of generated by UniCommandBuilder. 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 2008 Express edition does not allow to work with toolbox at all.


dotConnect Universal components in Visual Studio .NET 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.


How to compose a connection string for dotConnect Universal?

Generally the connection string is same as for the native data provider, with addition of Provider=ProvName; fragment. You can also use pooling options with any underlying data provider.


How can I determine what should I state as the provider name in the connection string?

See the Supported Providers topic in the dotConnect Universal documentation, or use the ProviderManager.GetProviderNames method.


How can I switch to non-bundled dotConnect for MySQL (dotConnect for Oracle, dotConnect for PostgreSQL, dotConnect for SQLite) in the Professional Edition?

Register the Devart.Data.Universal.MySql.dll (Devart.Data.Universal.Oracle.dll, Devart.Data.Universal.PostgreSql.dll, Devart.Data.Universal.SQLite.dll) in the Global Assembly Cache with gacutil. For more information on the matter see the Using Bundled Data Providers topic in the documentation.


Can I use a data provider that is not mentioned in your list of supported providers?

Sure, there are several ways to do this. See topic dotConnect Universal and Arbitrary Data Providers in the documentation.


How can I write SQL statements without being database-dependent?

dotConnect Universal introduces a brand new feature, which allows to compose SQL statements that are adjusted in run time before executing on the server. This is Unified SQL, or UniSQL. It allows developer to use conditional expressions and blocks of code, write literals and invoke functions in unified syntax, and many more features. See article UniSQL in the documentation for introduction to Unified SQL.


The UniParameter class has two similar properties: DbType and UniDbType. Which property should I use?

Use the UniDbType property because it is mapped to database types more precisely. When you set either of the properties, another one is adjusted automatically.


What servers can I use with the ASP.NET 2.0 provider model?

In dotConnect Universal you can use the ASP.NET 2.0 provider model with data providers for Oracle, MySQL, PostgreSQL, and SQL Server.


I use dotConnect Universal Mobile and get "InvalidProgramException", "AsmNotLoaded" errors when running my app on Pocket PC...

Such exceptions are usually caused by the fact that dotConnect Universal provider assembly (such as Devart.Data.Universal.MySql) is missing or invalid at your Pocket PC. You have to deploy it manually to the target application's directory. Make sure that you have dotConnect Universal provider assembly (such as Devart.Data.Universal.MySql.dll) on your device in the application's directory.


Can I use dotConnect Universal assemblies in the x64 process?

dotConnect Universal 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


What functionality of bundled data providers for Oracle, MySQL, PostgreSQL, and SQLite is included to Professional Edition of dotConnect Universal?

dotConnect Universal Professional Edition includes only run time of the Standard Edition of bundled dotConnects.



Mobile edition

When deploying application compiled with a trial version to mobile device, I'm getting the "trial period expired" exception. What's wrong?

The possible reason may be that the system date/time of the device is not synchronized with the date/time on your workstation; hence, the problem can be resolved by setting the date/time identical to the one on the workstation.

I'm getting "A socket operation encountered a dead network" when trying to connect with Mobile Edition in run time.

Make sure that you have synchronized your device with a workstation because some synchronization tool (e.g., Microsoft ActiveSync or Windows Mobile Device Center) should be used if you work with mobile device or emulator. Before deployment make Connect and Cradle to the emulator you want to use via Device Emulator Manager (the Tools menu in Visual Studio). After cradle the ActiveSync icon in the tray should become green (indication that synchronization is successful). In the case of Windows Mobile Device Center, its Sync Center should return the Connected and Sync completed statuses.