I'm not sure how pyodbc works internally, but you might try turning on
TCP protocol on the db if it is not already enabled.

On Nov 12, 11:59 pm, Crim <[email protected]> wrote:
> thanks a lot for your help xD now the only errors im getting are from
> not being able to connect to my db :P i think that there is something
> in the conf of the db that is keeping me from connecting :P
>
> ps if you just right click the web2py.py and run with python .. that
> works too xD thanks for teaching me about he binaries version ^ ^
>
> On Nov 12, 11:32 pm, "mr.freeze" <[email protected]> wrote:
>
> > No problem. Just download 
> > this:http://www.web2py.com/examples/static/web2py_src.zip
> > and extract it somewhere. From there do:
> > Start / Run / cmd / Hit enter
> > cd c:\where_ever_you_put_web2py_src
> > python web2py.py
>
> > If you get grief about python being an unknown command, then it means
> > the python exe is not in your PATH environment variable.  Follow 
> > this:http://docs.python.org/using/windows.htmltoresolve and try again.
>
> > On Nov 12, 11:22 pm, Crim <[email protected]> wrote:
>
> > > i ran the pyodbc.connect( and it work ... it didnt do anything ie no
> > > errors so it seems like its working xD
>
> > > im using the windows installer so i suppose binary ... i dont mean to
> > > sound like a huge noob but i am a little and would like to know how to
> > > "install" the source file
>
> > > On Nov 12, 11:13 pm, "mr.freeze" <[email protected]> wrote:
>
> > > > You would need to do snt = pyodbc.connect(...). It sounds like the
> > > > driver is working though. Are you running the binary or source version
> > > > of web2py. If you're running the binary version then it is using the
> > > > Python 2.5 that ships with web2py. You may want to try the source
> > > > version so that it uses your Python 2.7.
>
> > > > On Nov 12, 11:03 pm, Crim <[email protected]> wrote:
>
> > > > > 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