I am using the Npgsql 2.0.11.94 in a C# .NET 4.0 application to connect to a PostgreSql database. I have formed the connection string according to the example on their website, and when I call connect with the NpgsqlConnection object, this exception is thrown:
A first chance exception of type 'Npgsql.NpgsqlException' occurred in Npgsql.dll
Additional information: ERROR: 22023: 3 is outside the valid range for parameter "extra_float_digits" (-15 .. 2)
The code will execute correctly after the exception is thrown. That is, the connection to the database does get established and the queries return the correct data. Does anyone know why it's throwing this exception? Here is my code to connect to the db:
string strConnection = "Server=192.168.253.20;Port=5432;User Id=alex;Password=asdf;Database=mydatabase;";
NpgsqlConnection conn = null;
try
{
conn = new NpgsqlConnection(strConnection);
conn.Open();
}
catch (Exception e)
{
}
Any help would be much appreciated.
Thanks, Alex