Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)') [RSS Feed]

#1 Jan. 30, 2011 09:31:31

O.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')


Hello,
I have pyodbc-2.1.8 and python-2.6 on ubuntu-10.4.
I tried to connect to MSSQL2008 database server which is on windows7.
My code is below:
-----------------------
import pyodbc
conn = pyodbc.connect('DRIVER={SQL Server};SERVER=testserver
\mssql2008;DATABASE=eoffice;UID=erp;PWD=123')
-----------------------
When I run this code, the following error occurs:
Error: ('IM002', ' Data source name
not found, and no default driver specified (0) (SQLDriverConnectW)')

I tested the connection string using System.Data.Odbc library on
c#.net. It was fine.
I have no idea to solve my problem because of so general error
message.

Please share your experience!

regards,
Orgil

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 30, 2011 09:41:29

Adrian B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)')


On 30 Jan 2011, at 09:31, Orgil wrote:

> My code is below:
> -----------------------
> import pyodbc
> conn = pyodbc.connect('DRIVER={SQL Server};SERVER=testserver
> \mssql2008;DATABASE=eoffice;UID=erp;PWD=123')
> -----------------------

I'd try replacing 'testserver\mssql2008' with a domain name that your ubuntu
box can ping - or the IP address of the Windows 7 box.

Regards,

aid

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » pyodbc: Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnectW)') [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support