python 2.7

the import worked fine i tryed this next in the shell and got the
following error

import pyodbc

snt = connect('driver={SQL
Server};server=localhost;database=stuff;uid=sa;pwd=')


------------------

Traceback (most recent call last):
  File "C:/Users/name/Desktop/test", line 3, in <module>
    snt = connect('driver={SQL
Server};server=localhost;database=stuff;uid=sa;pwd=')
NameError: name 'connect' is not defined

not sure if i made the connection properly there

On Nov 12, 10:58 pm, "mr.freeze" <[email protected]> wrote:
> Start / Run / c:\python26\python.exe (or whatever your python version
> is)
> import pyodbc
>
> I see that there is only a 64bit driver for python 2.7. What version
> are you running?
>
> On Nov 12, 10:55 pm, Crim <[email protected]> wrote:
>
>
>
>
>
>
>
> > you mean just
> > import pyodbc
> > db = DAL('mssql://acc:p...@localhost/stuff', pool_size=0)
>
> > ??
>
> > On Nov 12, 10:51 pm, "mr.freeze" <[email protected]> wrote:
>
> > > Are you able to open a python shell and do this without error? If not,
> > > there is a problem with the driver:
> > > import pyodbc
>
> > > On Nov 12, 10:47 pm, Crim <[email protected]> wrote:
>
> > > > i do
>
> > > > if it makes a difference im on a 64bit system
>
> > > > On Nov 12, 10:46 pm, "mr.freeze" <[email protected]> wrote:
>
> > > > > Do you have the pyodbc driver 
> > > > > installed?http://code.google.com/p/pyodbc/
>
> > > > > On Nov 12, 10:43 pm, Crim <[email protected]> wrote:
>
> > > > > > it gives me this in the error snapshot:
> > > > > > <type 'exceptions.RuntimeError'>(global name 'pyodbc' is not defined
> > > > > > (tried 5 times))
>
> > > > > > On Nov 12, 10:40 pm, mdipierro <[email protected]> wrote:
>
> > > > > > > Can you post the exact error?
> > > > > > > There is not nothing working with your URI string and the 
> > > > > > > password is
> > > > > > > indeed optional.
>
> > > > > > > Massimo
>
> > > > > > > On Nov 12, 10:36 pm, Crim <[email protected]> wrote:
>
> > > > > > > > i wasnt able to figure out the meaning of the error...
>
> > > > > > > > On Nov 12, 10:32 pm, "mr.freeze" <[email protected]> wrote:
>
> > > > > > > > > Can you post the traceback of the error?
>
> > > > > > > > > On Nov 12, 5:27 pm, Crim <[email protected]> wrote:
>
> > > > > > > > > > so this is all the code i really have for this right now
>
> > > > > > > > > > db = DAL('mssql//s...@localhost/master')
>
> > > > > > > > > > just trying to connect to my localhost ms sql db that i set 
> > > > > > > > > > up using
> > > > > > > > > > the newest version of ms sql server ....
>
> > > > > > > > > > im just trying to use the default account sa to connect ... 
> > > > > > > > > > which
> > > > > > > > > > doesnt require a password and i always get errors
>
> > > > > > > > > > now i have read and checked the web2py book and i cant 
> > > > > > > > > > figure out the
> > > > > > > > > > error and i was wondering if one of you kind gents could 
> > > > > > > > > > lend a hand.

Reply via email to