By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,820 Members | 1,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,820 IT Pros & Developers. It's quick & easy.

connection mssql via database api 2.0

P: 5
hi,

i have an sql server 2005 database, and a username. with a software called navicat, i can connect there remotely and i can create tables.

actually i have to access there via python and database api 2.0, here i share the user name and password too:

Expand|Select|Wrap|Line Numbers
  1. import adodbapi
  2. ConnectionString = "Provider=SQLOLEDB.1;Data Source=sql2002.shared-servers.com,1086;Initial Catalog=ableton;User ID=ableton;Password=miklagard1;Trusted_Connection=False;"
  3. conn = adodbapi.connect(ConnectionString)
  4.  
and i got this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/adodbapi/adodbapi.py", line 298, in connect
raise InterfaceError #Probably COM Error
adodbapi.adodbapi.InterfaceError
I have tried to change the database into sql server 2008, i got the same error. Anyone has any idea where am i making the mistake?

Thanks.
Feb 12 '12 #1

✓ answered by cemyildiz

well i have solved it myself. i needed iron python which doesn't work in mac os. i am actually working on a pc instead of mac.

Share this Question
Share on Google+
2 Replies

P: 5
I have installed this module:

http://sourceforge.net/projects/adodbapi/

And I am using Mac OS X 10.7.3 as the OS, and Python 2.4.4.
Feb 12 '12 #2

P: 5
well i have solved it myself. i needed iron python which doesn't work in mac os. i am actually working on a pc instead of mac.
Feb 12 '12 #3

Post your reply

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