473,378 Members | 1,416 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,378 software developers and data experts.

Python and MSSQL connectivity

Does anybody have had success quering a MSSQL database using python 2.2.3 in a linux fedora dist?

Please give me the light
Jul 10 '07 #1
8 2768
bartonc
6,596 Expert 4TB
Does anybody have had success quering a MSSQL database using python 2.2.3 in a linux fedora dist?

Please give me the light
Although I don't have that exact experience, eGenix connects to ODBC very well. Put an ODBC between the MS db and your app. Almost guaranteed to work.
Jul 11 '07 #2
bartonc
6,596 Expert 4TB
Although I don't have that exact experience, eGenix connects to ODBC very well. Put an ODBC between the MS db and your app. Almost guaranteed to work.
I just checked that link. Version 3.0 looks to be brand new (as does the whole web site) and it looks like they are charging for it. I'm using and older version (2.0.6) which I didn't have to pay for for development purposes (non-commercial use).
Jul 11 '07 #3
Thanks fo the help, I've been looking for the mxodbc as well, but now all the older versions are not free of charge. Is there any other way to make a connection?

Please help
Jul 17 '07 #4
bartonc
6,596 Expert 4TB
Thanks fo the help, I've been looking for the mxodbc as well, but now all the older versions are not free of charge. Is there any other way to make a connection?

Please help
Yes, there is an odbc extension in the win32 package. I'll look up some info for you shortly.

Back soon,
Barton
Jul 17 '07 #5
bartonc
6,596 Expert 4TB
Yes, there is an odbc extension in the win32 package. I'll look up some info for you shortly.

Back soon,
Barton
If you have PythonWin installed, it's as easy as:
Expand|Select|Wrap|Line Numbers
  1. >>> import odbc
  2. >>> con = odbc.odbc('HETAP_Setup')
  3. >>> con.close()
  4. >>> help(odbc.odbc)
  5. Help on built-in function odbc in module odbc:
  6.  
  7. odbc(...)
  8.  
  9. >>> help(odbc)
  10. Help on module odbc:
  11.  
  12. NAME
  13.     odbc
  14.  
  15. FILE
  16.     d:\python24\lib\site-packages\win32\odbc.pyd
  17.  
  18. FUNCTIONS
  19.     odbc(...)
  20.  
  21. DATA
  22.     error = 'OdbcError'
  23.  
  24.  
  25. >>> 
Which is a little scary to me because I thought that a password would be required to get a connection.
Jul 17 '07 #6
I do have python installed in a linux box. Python version is 2.2.3. Forget windows. I found some interesting classes, and I'm testing them in linux. They work fine in win, but not in linux.

Cookbook/Python/Recipe/144183

Need to have this working in linux!
Jul 18 '07 #7
bartonc
6,596 Expert 4TB
I do have python installed in a linux box. Python version is 2.2.3. Forget windows. I found some interesting classes, and I'm testing them in linux. They work fine in win, but not in linux.

/Cookbook/Python/Recipe/144183

Need to have this working in linux!
Yeah, sorry: I slipped on that requirement in you original post. It's the MS part of "MSSQL" that threw me. Interesting project. I'll check out the recipe but have to remove the link due to site rules. Thanks.
Jul 18 '07 #8
bartonc
6,596 Expert 4TB
Yeah, sorry: I slipped on that requirement in you original post. It's the MS part of "MSSQL" that threw me. Interesting project. I'll check out the recipe but have to remove the link due to site rules. Thanks.
Great news on this front!!!
PyODBC looks to be the Python ODBC interface of the future. 2.4 and 2.5 are both currently supported!
Oct 12 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

28
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather...
13
by: Zeljko Vrba | last post by:
Now, why would I like to learn Python: because of IronPython port to CLR. Perl port to CLR doesn't seem to be coming soon. First Perl6 for Parrot has to be written, and then other backends.. ...
2
by: Josh Close | last post by:
Is there a python module that uses the mssql client tools to connect to mssql? When you install php on windows and you want mssql connectivity, you need the client tools and it uses that api to...
3
by: francisl | last post by:
We have to build some script were I work to make a dynamic server inventory. But, the project team, a windows crew, start it all in vbscript and on mssql. Note, due to political reason, we can...
9
by: arvind | last post by:
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...
4
by: aakash | last post by:
Hello Guys I am chaging the connectivity of MSaccess2K to sqlserver the code is written in vb editor of access i have established the connection string but the following query is generating...
113
by: John Nagle | last post by:
The major complaint I have about Python is that the packages which connect it to other software components all seem to have serious problems. As long as you don't need to talk to anything outside...
2
by: nehadk | last post by:
Hi, I am comparatively new to JavaScript and would like to know if database connectivity between JavaScript and MSSQL is possible? If so could someone provide me witha sample code.Thanks.
2
by: =?iso-8859-1?B?RmFkpQ==?= | last post by:
Hello mates, Something weird is happening or it's just the fact that I'm doing something wrong. When use mssql for db connectivity, and then i call mssql_fetch_array, the values i get from the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.