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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:37:07+00:00 2026-05-25T11:37:07+00:00

Is there a module available for connection of MSSQL and python 2.7? I downloaded

  • 0

Is there a module available for connection of MSSQL and python 2.7?

I downloaded pymssql but it is for python 2.6. Is there any equivalent module for python 2.7?

I am not aware of it if anyone can provide links.


Important note: in the meantime there is a pymssql module available. Don’t miss to read the answer at the end of this page: https://stackoverflow.com/a/25749269/362951

  • 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-25T11:37:08+00:00Added an answer on May 25, 2026 at 11:37 am

    You can also use pyodbc to connect to MSSQL from Python.

    An example from the documentation:

    import pyodbc
    cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=localhost;DATABASE=testdb;UID=me;PWD=pass')
    cursor = cnxn.cursor()
    cursor.execute("select user_id, user_name from users")
    rows = cursor.fetchall()
    for row in rows:
        print row.user_id, row.user_name
    

    The SQLAlchemy library (mentioned in another answer), uses pyodbc to connect to MSSQL databases (it tries various libraries, but pyodbc is the preferred one). Example code using sqlalchemy:

    from sqlalchemy import create_engine
    engine = create_engine("mssql://me:pass@localhost/testdb")
    for row in engine.execute("select user_id, user_name from users"):
        print row.user_id, row.user_name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I capture them? Is there any module/lib to do it? Please if
Is there any python module to convert PDF files into text? I tried one
Is there a Python module that can be used in the same way as
Is there a Python script or tool available which can remove comments and docstrings
Is there any Perl module available to send messages to Office Communicator? I searched
There is a module I'd love to download, but it is only available in
Is there any useful module on CPAN that returns number of biggest fractions of
There is simple JSON serialization module with name simplejson which easily serializes Python objects
There is a functionality in my module, where the user can scan the number
I'm curious if there is a module or available starting point to solve for

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.