Database Connection Initialization Issue
Posted: 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
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