Database Connection Initialization Issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
mgazaille
Posts: 1
Joined: Thu 11 Sep 2014 11:02

Database Connection Initialization Issue

Post by mgazaille » Thu 11 Sep 2014 11:18

I am just becoming familiar with the dotConnect provider software for .net framework. In my preliminary testing, I am just trying to connect to a PostgreSql database and having problems. I get the error exception when it gies into the dbconnection and primes the Host -- Error = A first chance exception of type 'System.TypeInitializationException' occurred in Devart.Data.PostgreSql.dll

My simple code is as follows:

Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports Devart.Data.PostgreSql

Module Module1
Sub Main()
Try
Dim pgSqlConnection1 As PgSqlConnection = New PgSqlConnection()
pgSqlConnection1.Host = "10.0.0.12" <-- Error Occurs
pgSqlConnection1.Port = 5432
pgSqlConnection1.UserId = "r00057_db"
pgSqlConnection1.Password = "XXXXXXXX"

pgSqlConnection1.Database = "cpsi"

Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try

Please help. Thanks

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Database Connection Initialization Issue

Post by MariiaI » Thu 11 Sep 2014 13:22

A first chance exception of type 'System.TypeInitializationException' occurred in Devart.Data.PostgreSql.dll
The bug related to the "The type initializer for 'Devart.Data.PostgreSql.PgSqlConnectionStringBuilder' threw an exception" error is fixed.
Please try the latest build of dotConnect for PostgreSQL 7.3.244.
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=3&t=30377.

Post Reply