473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Python database access

Hi all,
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
But I don't know how to make the connectivity or rather which module to
import.
I searched for the modules in the Python library, but I couldn't find
which module to go for.
Please help me out!

Jun 26 '06 #1
9 1905
On 25 Jun 2006 21:19:18 -0700, arvind <ar**********@gmail.com> wrote:
Hi all,
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
But I don't know how to make the connectivity or rather which module to
import.
I searched for the modules in the Python library, but I couldn't find
which module to go for.


The module you're looking for is the first result if you search
"python mysql" on google or if you search "mysql" on python package
index <http://www.python.org/pypi>
Jun 26 '06 #2
On 2006-06-26, Serge Orlov <se*********@gmail.com> wrote:
On 25 Jun 2006 21:19:18 -0700, arvind <ar**********@gmail.com> wrote:
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.

The module you're looking for is the first result if you search
"python mysql" on google or if you search "mysql" on python package
index <http://www.python.org/pypi>


I think he meant Microsoft SQL Server. In which case, google searches on
"python mssql" and "python odbc" should be helpful.

Dave Cook
Jun 26 '06 #3

arvind wrote:
Hi all,
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
But I don't know how to make the connectivity or rather which module to
import.
I searched for the modules in the Python library, but I couldn't find
which module to go for.
Please help me out!


I think there are a few recipes for mssql in the activestate python
cookbook, or at least for odbc.

Jun 26 '06 #4
> But I don't know how to make the connectivity or rather which module to
import.


Try mxODBC

http://www.egenix.com/files/python/mxODBC.html

Jun 26 '06 #5

The odbc module is part of the Python Standard Library. So you can
search for docs on using it in the Python2x.chm help file (or the HTML
version of the same docs) that comes with the Windows Python
disttribution. Its quite easy to use ODBC from Python, at least for
simple tasks like "select * from tablename".

Vasudev Ram
http://www.geocities.com/vasudevram
PDF conversion toolkt:
http://sourceforge.net/projects/xtopdf
BartlebyScrivener wrote:
But I don't know how to make the connectivity or rather which module to
import.


Try mxODBC

http://www.egenix.com/files/python/mxODBC.html


Jun 26 '06 #6
arvind wrote:
Hi all,
I am going to work on Python 2.4.3 and MSSQL database server on
Windows platform.
But I don't know how to make the connectivity or rather which module to
import.
I searched for the modules in the Python library, but I couldn't find
which module to go for.
Please help me out!

i suggest pymssql. It doesnt throw runtime error while executing a
query where prepackaged odbc module does.

Jun 26 '06 #7
> The odbc module is part of the Python Standard Library.

Since when?
--
damjan
Jun 27 '06 #8
Damjan wrote:
The odbc module is part of the Python Standard Library.

Since when?

Nope, it's a standard part of Mark Hammond's win32all extensions. As
such it probably comes with ActivePython for Windows, which many people
use as their standard distro.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Jun 28 '06 #9

Yes, Steve is right. Sorry for the mistake. In my case, I don't use
Active Python, I use the vanilla Python for Windows (the .msi installer
from python.org) and then immediately install the win32all package,
link to which is usually on the same page as the MSI. I do this as a
routine, whenever I upgrade my Windows Python version. Mainly use
win32all for the PythonWin IDE (a pretty decent one, particularly the
debugging support) which comes with it, though the win32all package
also has some support for using COM from Python.

So when I did an "import ODBC", since I had not separately installed an
ODBC module, I thought it was part of the Standard Library - whereas
its a part of win32all.

Vasudev
---
Vasudev Ram
Independent software consultant
Personal page: http://www.geocities.com/vasudevram
PDF conversion toolkit: http://sourceforge.net/projects/xtopdf (written
in Python, requires Python v2.2 or higher, ReportLab toolkit
(http://www.reportlab.org) v1.17 or higher).
Blog on software innovation: http://jugad.livejournal.com
---

Steve Holden wrote:
Damjan wrote:
The odbc module is part of the Python Standard Library.

Since when?

Nope, it's a standard part of Mark Hammond's win32all extensions. As
such it probably comes with ActivePython for Windows, which many people
use as their standard distro.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Love me, love my blog http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden


Jun 29 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: David ROBERT | last post by:
Hello, I need to read data from a MS Access database. The program (reader) is installed on a linux box and is written in python langage. The database is MS Access 2002 installed on a Win XP box...
9
by: DD | last post by:
Hello, Could anyone please help me?? Is there somebody who could explain me how to make a connection to a access database with a python cgi script. I would like to use common sql commands in my...
1
by: Uggen Kristin T | last post by:
For the first time, I am trying to program python in a windows-environment, and now I am having some trouble with combining python and MS Access... This is what I want to do: A MS Access...
2
by: aum | last post by:
Hi, I'm looking for an object-relational layer, which can wrap a MySQL database into highly pythonic objects. There seem to be dozens of packages which provide some of this functionality, but...
0
by: asdf sdf | last post by:
wondering what python resources might be available for python-based legacy system access, particularly to MVS, DB2 and Adabas. What additional pieces might be needed to implement this access? ...
1
by: bill ramsay | last post by:
Dear all. I am using an existing hodge-podge of an application that runs on top of an Access database. This application dials up customer equipment, handshakes then downloads/uploads various...
4
by: Carl | last post by:
Using COM and ADO on Win32, it is very easy to access databases (eg MySql, MS SQL Server, etc) from Python. Does anybody know if it is possible to access databases from Zope (which is written in...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
31
by: stéphane bard | last post by:
hello, my boss ask me to prefer windev to python. I have to argue - python work on multiple platform (linux, mac, windows) A good point but it didn't interest him. Because we want to choose a...
0
by: M.-A. Lemburg | last post by:
On 2008-05-12 07:43, Banibrata Dutta wrote: Most Python database modules adhere to the Python Database API specification (DB-API). The current version 2 is available in the PEP format as: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.