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

  • Home
  • SEARCH
  • 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 8902831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:42:47+00:00 2026-06-15T01:42:47+00:00

I’m connecting to an proprietary MSSQL database using python, sqlalchemy and pymssql. The database

  • 0

I’m connecting to an proprietary MSSQL database using python, sqlalchemy and pymssql. The database cannot be edited and I only need to read data from it. Now my programme spits out this message when it first runs a query on the database.

path/to/sqlalchemy/dialects/mssql/pymssql.py:50: SAWarning: Dialect mssql+pymssql does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage.
  return sqltypes.Numeric.result_processor(self, dialect, type_)

I understand this is sqlalchemy speaking to me and it means that when I read data from a field of type Decimal that it will be converted to a Float and rounded in the process.

So I have two questions about this…

Firstly, on a Linux machine is there a way to get Decimal data from an MSSQL database without this problem?

Secondly, why is the programme printing this message rather than crashing or raising an exception? If I can cope with this small error then how do I stop the message constantly being spat out at me?

  • 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-15T01:42:48+00:00Added an answer on June 15, 2026 at 1:42 am

    yes. use the pyodbc (free/OSS) or mxodbc (commercial, use mxodbc in 0.8 only with the latest mxodbc) dialects, they’ve been tested as delivering DECIMAL objects with full precision. pymssql is currently an unknown, as this DBAPI has undergone many rewrites/ownership changes and its status is a little up in the air.

    also, the warning is because you can get decimal objects back, they will just be subject to the usual floating point weirdnesses (like 3.456 coming back as 3.4559999999999 type of thing). So better to allow the values to be read with caveats than to block what is otherwise partially working functionality.

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

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
In my XML file chapters tag has more chapter tag.i need to display chapters

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.