Message from discussion
login failed : sql server 2008 R2
Received: by 10.91.43.6 with SMTP id v6mr6680808agj.15.1296758762015;
Thu, 03 Feb 2011 10:46:02 -0800 (PST)
X-BeenThere: pyodbc@googlegroups.com
Received: by 10.90.23.15 with SMTP id 15ls312230agw.2.p; Thu, 03 Feb 2011
10:46:01 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.25.14 with SMTP id 14mr84164agy.8.1296758761235; Thu, 03
Feb 2011 10:46:01 -0800 (PST)
Received: by u4g2000yqi.googlegroups.com with HTTP; Thu, 3 Feb 2011 10:46:01
-0800 (PST)
Date: Thu, 3 Feb 2011 10:46:01 -0800 (PST)
In-Reply-To: <9993207d-56d3-4eef-b48b-a62a9e5c1993@r19g2000prm.googlegroups.com>
X-IP: 75.54.92.142
References: <3e79b7e2-2786-45cb-965a-90362f81edf6@o7g2000prn.googlegroups.com>
<bbb535ee-0751-4790-87b6-2357ac1aadf5@y12g2000prf.googlegroups.com> <9993207d-56d3-4eef-b48b-a62a9e5c1993@r19g2000prm.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10,gzip(gfe)
Message-ID: <44435d24-150b-41e8-8128-ef341524ecf9@u4g2000yqi.googlegroups.com>
Subject: Re: login failed : sql server 2008 R2
From: Jonathan Cox <jonathangeo...@gmail.com>
To: pyodbc <pyodbc@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
And here I expose my extreme ignorance. I had thought that W7 came
with its ODBC drivers packaged to ready-to-use. I hadn't tried any
sort of connection with them at all.
I used the ODBC setup in Control Panel, and found that there was
nothing pointed at SQL Server. I created a new one, received an
affirmation that it was working when I clicked the 'test connection'
button, then tried the Py code again. Both:
cnxn =3D pyodbc.connect('DRIVER=3D{SQL Server Native
Client10.0};SERVER=3Dlocalhost;DATABASE=3Dtestdb;UID=3Dguest')
#####################old code
and
cnxn =3D
pyodbc.connect('DRIVER=3D{SQL_ODBC};SERVER=3Dlocalhost;DATABASE=3Dtestdb;UI=
D=3Dguest')
################new code with the driver name that I just created
now produce this error message:
File "<pyshell#5>", line 1, in <module>
cnxn =3D
pyodbc.connect('DRIVER=3D{SQL_ODBC};SERVER=3Dlocalhost;DATABASE=3Dtestdb;UI=
D=3Dguest')
Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified (0)
(SQLDriverConnectW)')
I have a feeling that I'm just not doing some very basic SQLServer/
ODBC setup correctly. Is there a rudimentary walkthrough or tutorial
that I can use? I feel bad using your time for elementary questions
that are likely unrelated to the workings of pyodbc itself.
many thanks
On Feb 3, 10:34=A0am, "rmsh...@me.com" <rmsh...@me.com> wrote:
> Jonathan,
>
> Are you getting a successful connection with your ODBC driver using
> these credentials?
>