Questions tagged [pymssql]

A discontinued interface for Python that provided a standard Python DB-API interface to Microsoft SQL Server.

Pymssql was an interface for Python that provided a standard Python DB-API (as defined by PEP 249) interface to Microsoft SQL server. It was discontinued in November 2019.

Related tags:

621 questions
7
votes
2 answers

Convert or strip out "illegal" Unicode characters

I've got a database in MSSQL that I'm porting to SQLite/Django. I'm using pymssql to connect to the database and save a text field to the local SQLite database. However for some characters, it explodes. I get complaints like…
Oli
  • 235,628
  • 64
  • 220
  • 299
6
votes
1 answer

What are the advantages and disadvantages of using pypyodbc, pymssql, and pyodbc?

I know that Pypyodbc is the newer version of Pyodbc. A question before asked about the comparison between these two but I want to add Pymssql into the mix.
HamTheBurger
  • 308
  • 1
  • 3
  • 17
6
votes
5 answers

How to catch exceptions from PyMSSQL

I am using PyMSSQL to connect to a database. However, if I enter the incorrect details or there is some other problem, PyMSSQL throws an exception. However, I cannot work out how to catch the exception. I've used every variation I can think of but I…
user1718097
  • 4,090
  • 11
  • 48
  • 63
6
votes
4 answers

How to install pymssql module in Python 3.6?

I have been through a couple of documentations involving FreeTDS, Wheel, git and github but nothing was working on my Windows 10 PC with Python 3.6 but I need to install it. I'm working on a project and I'm most comfortable with mssql which is…
Gautham Kolluru
  • 99
  • 1
  • 1
  • 7
6
votes
4 answers

Error Installing pymssql

I'm fairly new to Python development but very quickly I've run into a roadblock and I'm not sure how to resolve it. I am using Python 3.6 and VS Code as an IDE, but I also have VS 2015 Express and VS 2017 Build Tools installed on my machine. I've…
p.s.w.g
  • 146,324
  • 30
  • 291
  • 331
6
votes
5 answers

How to judge which version of .whl file is supported when install a Python package

Recently, I just try to connect my SQL Server in python. So I just download the .whl file from "http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql". in cmd windows, I use the following command: pip install some-package.whl My pc is window 64bit, I…
Wang Jijun
  • 326
  • 4
  • 10
6
votes
2 answers

Use SQL query result column names as pandas dataframe column names

How can I add the columns names from sql query to pandas dataframe. I'm doing the following, but columns=columns doesn't work in my case. import pymssql import pandas as pd con = pymssql.connect( server="MSSQLSERVER", port="1433", …
Keithx
  • 2,994
  • 15
  • 42
  • 71
6
votes
1 answer

Cannot map ForeignKey due to dual Primary Keys

I'm trying to create tables on-the-fly from existing data...however, the table I need has dual Primary Keys. I can't find how to satisfy the restrictions. I.e. I start with the following two tables... self.DDB_PAT_BASE = Table('DDB_PAT_BASE',…
RightmireM
  • 2,381
  • 2
  • 24
  • 42
6
votes
2 answers

Windows Authentication With SQLAlchemy and pymssql

I want to create trusted connections to a SQL Server database, using pymssql. Given that that code is going to be shared though, I don't want users entering their usernames, or passwords. I've found documentation that has conflicting information…
Batman
  • 8,571
  • 7
  • 41
  • 80
6
votes
1 answer

Error Installing pymssql on Mac OS X Yosemite

I receive the following error when installing pymssql on OS X Yosemite 10.10.3 - has anyone gotten around the following error? I am using FreeTDS (v0.91.112) version 7.1 and Python 2.7.6 - the tsql utility connects to a SQL Database with no…
Joseph Idziorek
  • 4,853
  • 6
  • 23
  • 37
6
votes
3 answers

Python - Linux - Connecting to MS SQL with Windows Credentials - FreeTDS+UnixODBC + pyodbc or pymssql

There doesn't seem to be any great instructions for setting this up. Does anyone have any good instructions? I am a linux noob so be gentle. I did see another post that is similar, but no real answer. I have a couple of problems. FreeTDS…
Keith P
  • 2,150
  • 1
  • 18
  • 15
6
votes
3 answers

PYmssql python connection string

I have downloaded Pymssql to connect to the sqlserver db but the connection string is throwing error-pymssql.connect(pymssql.c.:7990) import pymssql pymssql.connect(host='username\SQLEXPRESS',user='username',password='pwd',database='master') Anyone…
user1050619
  • 19,822
  • 85
  • 237
  • 413
5
votes
4 answers

Rows as dictionaries - pymssql

I want to receive rows as dictionaries in pymssql. in python-idle i ran: >>> conn = pymssql.connect(host='192.168.1.3', user='majid', password='123456789', database='GeneralTrafficMonitor', as_dict=True) >>> cur = conn.cursor() >>>…
Majid Azimi
  • 5,575
  • 13
  • 64
  • 113
5
votes
1 answer

gcc: _mssql.c: No such file or directory

I'm trying to compile pymssql for python 2.5. I'm doing this because I think the version of pymssql I have is compiled for python 2.4. This is the error I get which makes me think that: /home/username/lib/python2.5/pymssql.py:30: RuntimeWarning:…
Neil
  • 8,925
  • 10
  • 44
  • 49
5
votes
4 answers

pymssql throws ImportError: No module named _mssql when build app with py2exe

I have python application that shoud be launched as windows executable. I'm using py2exe and pymssql 1.9.908. I used next build script to generate application: from distutils.core import setup import MySQLdb import fnmatch import os import…
varela
  • 1,281
  • 1
  • 10
  • 16
1 2
3
41 42