dotConnect Universal Frequently Asked Questions
Couldn't find the answer to your question?
Take a look at our
support forum.
Answers
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, and PostgreSQL
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.
To upgrade to newer version I have to uninstall dotConnect Universal first. How do I do it right?
Close all running IDEs and help collections, then choose Uninstall dotConnect Universal
link from Start menu.
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 2005 Express.
What is required for my application to work on end-user machine?
To deploy applications written with dotConnect Universal, copy the run-time assemblies
Devart.Data.Universal.dll and Devart.Data.Universal.xxx.dll (xxx is codename of data provider you work with) to target machine.
These assemblies can be registered at the Global Assembly Cache (GAC) for the appropriate .NET Framework or placed
in the folder of your application.
If you are using the standalone (not bundled) data providers, you will also have to deploy their assemblies.
Please refer to corresponding topics in the documentation.
In some cases the end-user's environment should be informed about the existence of the provider factory.
The provider factory is described either in machine.config (globally) or in *.config (just for your application).
Assuming that you use dotConnect Universal, this is done as follows:
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.Universal"/>
<add name="dotConnect Universal Data Provider" invariant="Devart.Data.Universal"
description="Devart dotConnect Universal Data Provider"
type="Devart.Data.Universal.UniProviderFactory, Devart.Data.Universal,
Version=3.0.2.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
Another way to install the *.dll files of dotConnect Universal is to launch setup program of dotConnect Universal and choose
"Minimal" option. Note that according to License Agreement this is the only setup mode that you can
use on target machine.
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.
How to deploy web projects that use dotConnect Universal?
In addition to common deployment routine, you may also need to deploy the Devart.Data.Universal.Web.dll,
Devart.Data.xxx.Web.dll and App_Licenses.dll assemblies.
The *.Web.dll assemblies are required for using the ASP.NET Provider Model, and
the App_Licenses.dll assembly is a part of
Licensing
mechanism. Also keep in mind
that web projects are usually run as partially trusted code. dotConnect Universal requires ReflectionPermission in
addition to the medium trust level; the actual data provider may require other permissions.
for more information refer to corresponding documentation.
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 "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:
- The project was earlier compiled with old or trial version of data provider.
- File licenses.config used by a class library does not refer to launched executable.
- The App_Licenses.dll belongs to other application or needs to be recompiled.
- Something's wrong with the operating system or installation of dotConnect Universal.
If you encounter this problem delete all files from obj folder and rebuild the project. If this does not help send
to our support address small compiled binary with sources so we can investigate the problem detailed.
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 2005 Express edition does not allow to
work with toolbox at all.
dotConnect Universal components in Visual Studio .NET 2005 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.