473,666 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1919
On 25 Jun 2006 21:19:18 -0700, arvind <ar**********@g mail.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*********@gm ail.com> wrote:
On 25 Jun 2006 21:19:18 -0700, arvind <ar**********@g mail.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
BartlebyScriven er 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
10748
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 networked with the linux box. Is it possible for python/linux to read data from MS Access Database ?
9
3531
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 python scripts as I can with MySQLdb. But I cannot even connect to the access database (see below). Could anyone explain it to me as simple as possible please. I'm using Windows XP, ActivePython 2.3.2 build 230 and Microsoft access(XP?)
1
1783
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 database is started, this database has numerous VB-forms, and one of those forms calls my python-program, so far so good. But before my python-program quits, I want to call one of the VB-forms in the database. This I haven't been able to find out how to...
2
1891
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 all the ones I've looked at so far have major drawbacks. What I'm looking for in an object-relational wrapper layer is:
0
1494
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? Python would be running on Unix and need to do Adabas and DB2 access. Screen-scraping is a common technique. Any screen scraping modules for python? I assume this would require an SNA gateway on the unix system to enable 3270 emulation? True?
1
4013
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 bits of information in the access database. The original application is designed for some poor sod to sit there for hours and manually do the necessary.
4
1554
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 Python) using COM and ADO? Carl
10
3681
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. Andrew dalke@dalkescientific.com
31
7071
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 language for prototyping. So multi platform is not enough. - python and windev are fast to develop
0
1113
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: http://www.python.org/dev/peps/pep-0249/ The spec was created and is maintained by the Python DB-SIG: http://www.python.org/community/sigs/
0
8360
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8784
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.