-
Notifications
You must be signed in to change notification settings - Fork 348
Closed as not planned
Description
Software versions
NuGet Package 2.40
VB.NET Framework 4.6.2
MariaDB 10.11
It is happening in a W2022 server, in other systems (with different SO) it is working properly.
Describe the bug
When opening a DB connection it throws the next exception:
The type initializer for 'MySqlConnector.Core.ConnectionPool' threw an exception. - - Error Description InnerExc.: The type initializer for 'PerTypeValues`1' threw an exception.
Code sample
Public Sub New(ByVal strConnectionString As String)
Try
Try
ConnectionString = strConnectionString
objConn = New MySqlConnection(strConnectionString)
objConn.Open()
If objConn.State = ConnectionState.Closed Then
objConn.Open()
End If
Catch ex As MySqlException
MsgError = "DB Error: " & ex.Message & " - A connection to DB cannot be established." & vbCr & "ConnectString = " & strConnectionString
Exit Sub
End Try
Catch ex2 As Exception
MsgError = "Error: " & ex2.Message & " - A connection to DB cannot be established." & vbCr & "ConnectString = " & strConnectionString
Exit Sub
End Try
The exception is thrown through Catch ex2 As Exception
Additional context
DBConnectString = server=;port=3306;userid=root;password=<PWD;database=
Metadata
Metadata
Assignees
Labels
No labels