Quantcast

dbabi - ms sql 2005

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dbabi - ms sql 2005

cem yildiz
hi,

i am trying to connect sql server 2005 via db api 2.0 in last 3 days but i couldn't handle it. i can connect to the database remotely by navicat without any problem. i would be really very happy if anyone knows where do i make the mistake.

>>> import adodbapi
>>> cs = "Provider=SQLOLEDB;Data Source=sql2002.shared-servers.com,1086;Initial Catalog=ableton;User ID=ableton;Password=miklagard1;"
>>> conn = adodbapi.connect(cs)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adodbapi.py", line 298, in connect
    raise InterfaceError #Probably COM Error
adodbapi.InterfaceError

thank you all,
cem

_______________________________________________
DB-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/db-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbabi - ms sql 2005

Vernon D. Cole
Using Python 3.2.2 and pywin32-217 on Windows 7 (all 64 bit), I get this result (filtering out the crud):
  pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE Provider for SQL Server', "Login failed for user 'ableton'.", None, 0, -21472843), None)

Which would mean that the server is working and does not recognize your password, which, I hope, is to be expected. I see nothing wrong with your code.

What versions of everything are you using?
--
Vernon

On Sat, Feb 11, 2012 at 1:45 PM, cem yildiz <[hidden email]> wrote
hi,

i am trying to connect sql server 2005 via db api 2.0 in last 3 days but i couldn't handle it. i can connect to the database remotely by navicat without any problem. i would be really very happy if anyone knows where do i make the mistake.

>>> import adodbapi
>>> cs = "Provider=SQLOLEDB;Data Source=sql2002.shared-servers.com,1086;Initial Catalog=ableton;User ID=ableton;Password=miklagard1;"
>>> conn = adodbapi.connect(cs)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adodbapi.py", line 298, in connect
    raise InterfaceError #Probably COM Error
adodbapi.InterfaceError

thank you all,
cem

_______________________________________________
DB-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/db-sig



_______________________________________________
DB-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/db-sig
Loading...