by
285 9
1
4
3,357
3
Top 1% !
Famous
Specified
OpenSource
Popularity: 3200th place
Created
Modified Oct 4, 2016

Published on:

No tags for this snippet yet.
Languagepython
LicenseMIT_X11

Python acessando banco de dados SQL Server

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1468596/Python-acessando-banco-de-dados-SQL-Serv?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
----------------INSTALAR-------------------------- apt-get install python freetds-common apt-get install python-pymssql apt-get purge python-pymssql apt-get install freetds-dev pip install Cython pip install pymssql --------------------TESTE.PY------------------------------ import pymssql conn=pymssql.connect(host='xx.xx.xx.xx', user='sa', password='xxxxxxxx', database='teste') cur=conn.cursor() cur.execute("SELECT nomes from usuarios") for row in cur: print row conn.commit() conn.close()
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus