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 7669603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:37:51+00:00 2026-05-31T15:37:51+00:00

I am relatively new to databases, performing SQL queries, etc. At the moment I

  • 0

I am relatively new to databases, performing SQL queries, etc. At the moment I am exclusively using MS SQL Server for my DBs (that’s what we use at my work), but hopefully answers to my question can be more general than just for that particular DB.

I do a good chunk of my work using the DB interface app itself (in this case, SQL Server Management Studio), but I also do some work through python scripts, some of which run as cron jobs, some of which are websites such that users can submit queries into the DB.

I have been using the pymssql module for querying into & writing into DBs from python. But there are a few annoying problems that I’m running into. (It seems pymssql cannot use temporary tables, and also I’ve had troubles with “autocommit”, but that’s likely my own fault.)

So being ignorant to much of this, I’d just like a flavor of what direction I should go. As far as I can tell, I could either:

  • use pymssql, which talks directly to the MS SQL servers
  • use pyodbc, which requires installing FreeTDS & unixODBC first, and setting them up
  • use adodbapi module, and I’m not sure what requirements are needed here.
  • another method??

Thing is, I don’t FULLY get what ODBC does. It seems like some sort of “authentification intermediary”, sort of like a middle man to ensure that the user is who he / she says. And I have even less understanding of ADO.

While pymssql seems the easiest way to go, it also seems the one that folks think less highly of, and that it will eventually be deprecated. I’d rather learn the “right” way since I am pretty much just starting out with this stuff.

So I’m looking for some knowledgeable opinions regarding the best way to get python to talk to MS SQL Server, and to talk to DBs in general. I would define “best” as the best for someone who will do moderately complex stuff with it. (While I am just getting started, it’s something that I’ll eventually have to ramp up on quite a bit.)

Thanks!
Mike

  • 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-05-31T15:37:53+00:00Added an answer on May 31, 2026 at 3:37 pm

    pyodbc (recommended)

    I’ve started using this module a few months ago and have no complaints so far. The development community seems more active than pymssql. I had no installation issues so far (32bit Win XP and 64bit Server 2008 R2). You’ll have the additional advantage that you are not limited to MS SQL Servers.

    You might find: http://www.lfd.uci.edu/~gohlke/pythonlibs/ helpful if you’re installing on windows.

    pymssql

    I’ve worked with the 1.x version for about 2.5 years. I had some minor problems with the size limitations for large objects. I also ran into massive problems when multi-threading (to the point I had to turn if off). 1.x was based on deprecated MS libraries. However, the recent version is 2.x and does not use these deprecated libraries any longer. Instead it uses FreeTDS (like pyodbc). It sounds good, but I haven’t tried it yet.

    adodbapi

    I’ve tried switching out pymssql and replacing it with adodbapi about a year ago and some of the queries which worked fine with pymssql failed for no obvious reason. I quickly abandoned adodbapi again.

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

Sidebar

Related Questions

I'm using Microsoft SQL Server 2005, and am relatively new to SQL in general.
I am relatively new to SQL Server so I hope you can help. Basically
I am relatively new to sql and asp. My problem is that i need
I am relatively new to php and have a feeling that I am going
I'm relatively new to .NET and have being using Linq2Sql for a almost a
I'm relatively new to NoSQL databases and I have to evaluate different NoSQL-Solutions for
I am doing some performance tests using .Net 3.5 against SQL Server. I am
Relatively new to using database and for some reason I can't get this 'execute'
I am relatively new to PHP/MySQL and have been having a problem that I
I am relatively new Java developer that's been thrown in the deep end, my

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.