dotConnect for PostgreSQL Frequently Asked Questions
Answers
What is the difference between the Standard and Professional editions?The Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes. The Professional Edition adds more classes, tools, technologies, and integration capabilities. The following list briefly enumerates main advantages of Professional Edition.
- Entity Framework support allows you to employ the latest conceptual technology from Microsoft.
- LINQ to PostgreSQL support allows you to focus on objects instead of relational data in database application development.
- PgSqlLoader class serves to load external data into the PostgreSQL database extremely fast.
- PgSqlDump class serves to store a database or its parts as a script and to restore database from the generated script.
- DataLink class serves for universal cross-form data binding.
- Powerful PgSqlDataTable component as all-in-one table data access solution.
- PgSqlDataSet class allows using typed and untyped provider-specific datasets.
- DataSet Wizard greatly simplifies process of generating datasets in your application.
- DataSet Manager and DataSet Editor help managing the datasets.
- Support for DBMonitor that performs per-component tracing of database events such as SQL statement execution, commit, rollback, etc.
- Enterprise Library support allows you to take advantage of Data Access Application Block functionality.
- ASP.NET 2.0 providers support allows using the dotConnect for PostgreSQL in ASP.NET 2.0 provider model.
Express Edition is a free data provider with basic connectivity features. Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes.
The following list briefly enumerates main advantages of Standard Edition.
- PostgreSQLScript class serves to execute series of SQL statements separated by special symbols
- PostgreSQLMonitor class monitors dynamic SQL execution in applications that use dotConnect for PostgreSQL
- PostgreSQLDependency class tracks changes on the server
- PostgreSQLSelectStatement class represents PostgreSQL SELECT statement
- Design-time features allow you to move the development process from run time to design time, which is way more comfortable
- Visual Studio 2005/2008 integration helps to design applications in more convenient and fast way
- InterForm technology allows referencing components that reside on different forms of a WinForms application
- Migration Wizard helps to migrate project to dotConnect for PostgreSQL from Microsoft ODBC and OLEDB data providers.
Make sure you had uninstalled the trial version correctly. There should be no old (trial) assemblies present in your system. Uninstall dotConnect for PostgreSQL and check your Global Assembly Cache and local folders for Devart.* assemblies. Remove all Devart.* files and reinstall dotConnect for PostgreSQL. To upgrade to newer version I have to uninstall dotConnect for PostgreSQL first. How do I do it right?
Close all running IDEs and help collections, then choose Uninstall dotConnect for PostgreSQL link from Start menu. You say, there are sample projects, but I can't find any.
Probably you installed dotConnect for PostgreSQL not in typical mode. Please choose typical when installing dotConnect for PostgreSQL. All samples are installed by default in \Program Files\dotconnect\PostgreSQL\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 for PostgreSQL you should register necessary run-time assemblies at Global Assembly Cache for appropriate .NET Framework or place it in the folder of your application (more on that in the Deployment topic). Another way to install the *.dll files needed is to launch setup program of dotConnect for PostgreSQL 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 for PostgreSQL on machine that does not have Visual Studio or Delphi installed?
Choose "Minimal" type when asked by the installer. How to deploy web projects that use dotConnect for PostgreSQL?
Place Devart.Data.PostgreSql.dll and Devart.Data.dll in the bin folder of your web project. Depending on the type of your project, you may also need the Devart.Data.PostgreSQL.Web.dll file. Another way to install the *.dll files needed is to launch setup program of dotConnect for PostgreSQL on a target machine and choose "minimal" option. How do I upgrade my projects to dotConnect for PostgreSQL 4.00?
In this release there were some important name changes in the product.
Particularly, assemblies, namespaces, invariant name, and some types
were changed as follows:
"CoreLab.Data" became "Devart.Data";
"CoreLab.PostgreSQL" became "Devart.Data.PostgreSQL";
"PostgreSQLDirectFactory" became "PostgreSQLProviderFactory";
Invariant name became "Devart.Data.PostgreSQL";
Your projects must be updated to be compatible with dotConnect for PostgreSQL 4.0. Here is the list of files you should update:
*.csproj, *.vbproj - references to assemblies
*.cs, *.vb - namespaces
*.licx - namespaces and assembly names
Web.config - assembly names and web provider types
This is done automatically when you invoke the Upgrade wizard from Visual Studio menu: Tools | PostgreSQL | Upgrade Wizard.
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. You can learn the versions of providers compatible with the one you have installed in its documentation (the "Compatibility" topic).
To avoid this compatibility issue install the latest versions of the providers.
Subscriptions I have a registered version of dotConnect for PostgreSQL. Will I need to pay to upgrade to future versions?Since PostgreSQLDirect .NET 3.00, all upgrades to future versions are free to users with an active dotConnect for PostgreSQL Subscription.
Users that have a registration for versions of dotConnect for PostgreSQL prior to PostgreSQLDirect .NET 3.00 will have to first upgrade to PostgreSQLDirect .NET 3.00 to jump in on the Subscription Program.
What are the benefits of the dotConnect for PostgreSQL Subscription Program?The dotConnect for PostgreSQL Subscription Program is an annual maintenance and support service for dotConnect for PostgreSQL users.
Users with a valid dotConnect for PostgreSQL Subscription get the following benefits:
- Access to new versions of dotConnect for PostgreSQL when they are released
- Access to all dotConnect for PostgreSQL updates and bug fixes
- Product support through the dotConnect for PostgreSQL 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 PostgreSQL-related questions from the dotConnect for PostgreSQL developers themselves. Priority Support is carried out over email and has a two business day response policy.
The dotConnect for PostgreSQL Subscription Program is available for registered users of dotConnect for PostgreSQL 3.00 and higher.
Can I use my version of dotConnect for PostgreSQL after my Subscription expires?Yes, you can. dotConnect for PostgreSQL version licenses are perpetual.
Licensing What is the licensing you use?dotConnect for PostgreSQL uses .NET component licensing. To build operational application dotConnect for PostgreSQL requires valid license. If no license is available, dotConnect for PostgreSQL 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 PostgreSQL the system is configured so that licensing is done transparently. License is automatically added to project when you place a PgSqlConnection 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 for PostgreSQL version that did not use component licensing, that is, 3.20 and older. For instructions on how to add license manually refer to Licensing topic in dotConnect for PostgreSQL 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 for PostgreSQL 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 dotConnect for PostgreSQL.
- 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 for PostgreSQL.
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 for PostgreSQL, 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 PostgreSQL work with SQL Server 2005 Business Intelligence Solutions?To do this install dotConnect for PostgreSQL on same computer where SQL Server 2005 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 | PostgreSQL | License Information.
Do end-users need a license?No, end-users of your application do not require any license. Connection pooling I call PgSqlConnection.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 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 PostgreSQL?
There are several ways to open dotConnect for PostgreSQL documentation:
- Use appropriate shortcut in start menu, for instance, Start - Programs - Devart dotConnect for PostgreSQL - Documentation.
- Use command in the IDE: Tools - PostgreSQL - dotConnect for PostgreSQL Help.
- Position cursor on some class from Devart.Data.PostgreSql and press F1.
Correctly installed documentation appears as separate node in combined collection of Visual Studio and CodeGear Delphi. If you can't find dotConnect for PostgreSQL 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 PostgreSQL. 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. ADO.NET Entity Framework Are LINQ to SQL and Entity Framework supported?
dotConnect for PostgreSQL supports the latest version of ADO.NET Entity Framework. At the moment the LINQ to SQL technology support is in progress. Where do I start with Entity Framework?
First of all, launch the Visual Studio Entity Data Model Wizard, which generates the model, store, and mapping definitions. Follow the wizard's instructions and in the end you will have all necessary files ready for your Entity Framework application. To invoke the wizard, add new item ADO.NET Entity Data Model to your project. Are there any demo projects to play with?
Yes, dotConnect for PostgreSQL includes two 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 PgSqlDataAdapter or PgSqlDataTable. What can be wrong?
This can happen when PgSqlCommandBuilder generates a query without primary key field. To avoid it use custom update command instead of generated by PgSqlCommandBuilder. 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 working with toolbox at all. dotConnect for PostgreSQL components in Visual Studio 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. SQL Server Integration Service (SSIS) can't get the list of tables in my PostgreSQL server.
This is an architecture limitation from Microsoft, SSIS understands metadata of SQL Server only. To circumvent this you have to write queries manually. General issues related to PostgreSQL server Cannot connect to server on %host name%...
This is actual for mobile edition. Use IP of the server instead of DNS name. It is recommended to use internal IP address. For information on how to address target machine refer to network administrator. How to get result set from a stored procedure?
Set PgSqlCommand.CommandType to StoredProcedure and CommandText to name of the procedure, then issue PgSqlCommand.ExecuteReader() method.
You can also do it through parameter with Direction set to System.Data.ParameterDirection.ReturnValue. For example on how to do it refer to article "Using Parameters" in dotConnect for PostgreSQL documentation. What about performance?
We regularly carry out performance tests on different databases with miscellaneous environments. The tests show that dotConnect for PostgreSQL is much better than ODBC, OLEDB, and Npgsql. Besides that dotConnect for PostgreSQL has much more features than any other data provider. Non-latin characters in my data are not retrieved correctly.
Use UTF-8 encoding. To enable it, set Connection.Unicode property to true or include Unicode=true; in connection string. Keep in mind, however, that this affects performance.
