Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8500715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:01:04+00:00 2026-06-11T01:01:04+00:00

I am using the Npgsql 2.0.11.94 in a C# .NET 4.0 application to connect

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:01:05+00:00Added an answer on June 11, 2026 at 1:01 am

    It’s a bug with the initial set-up upon establishing a connection.

    There are a few different commands that get carried out on every connection that is first opened (but not repeatedly when pooled connections are re-used), and this one is at attempt to deal with the different degrees of precision allowed with floating-number formatting between different versions of PostgreSQL.

    Clearly it’s not going quite as planned.

    Taking a quick look at the source, it seems that the call is wrapped and should eat any such exception, but maybe that’s after the last release. If so, then building from source may solve your problem.

    Or you could go back a version, or just wrap with a try-catch until the next release.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Npgsql to connect to the postgresql database from visual studio 2010.
I'm using Npgsql 2.0.11 under .NET 4.0 to modify a PostgreSQL 9.0 database. The
I have an application based on 3 tier architecture with postgres database(npgsql) having more
I have project in ASP.NET with postgreSQL database. I do not know what of
I would like to create a web application using PostgreSQL as a database. I
I'm using Npgsql with C# to communicate with my PostgreSQL database. All names used
Using android 2.3.3, I have a background Service which has a socket connection. There's
I'm using Visual Studio 2008, SQL Server 2008, asp.net mvc 2. Now, I have
I have an existing ASP.NET app which is configured to connect to a MS
I'm using Entity Framework, model first, self-tracking entities with Npgsql provider (VS2010 - .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.