The URI string in

db=SQLDB("mysql://root:localhost/db") # WRONG

is wrong. Should be

db=SQLDB("mysql://root:passw...@localhost/db") # RIGHT

You can find examples on

http://www.web2py.com/examples/default/dal



On Apr 3, 7:56 am, dbb <[email protected]> wrote:
> To Prof.  Massimo : I have errors related to the database used in T3,
> I used mysql, then I get errors. The trace is pasted below. --
> Massimo, my ambition is to have a T3 pages  which can connect to
> different databases in the same applications. My pressing question now
> is , does T3 connect to other databases?
>
> Ticket 127.0.0.1.2009-04-03.08-47-27.8058e2e3-c31a-43bd-af62-
> bf042f0f38b9
>
> Error traceback
> 1.2.3.4.5.6.7. Traceback (most recent call last):  File "C:\web2py
> \gluon\restricted.py", line 98, in restricted  File "C:/web2py59/
> applications/plugin_t3/models/db.py", line 10, in <module>    db=SQLDB
> ("mysql://root:localhost/db")         # if not, use SQLite or other
> DB  File "C:\web2py\gluon\sql.py", line 609, in
> __init__AttributeError: 'NoneType' object has no attribute 'group'
>
> In file: C:\web2py59\applications\plugin_t3/models/db.py
> 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60.61.62.63.64.65.66.67.68.69.70.71.72.73.74.75.76.77.78.79.80.81.82.83.84.85.86.87.88.89.90.91.92.93.94.95.96.97.98.99.100.101.102.103.104.105.106.107.108.109.110.111.112.113.114.115.116.117.118.119.120.121.122.123.124.125.126.127.128.129.130.131.132.133.134.135.136.137.138.139.140.141.142.143.144.145.146.147.148.149.150.151.
> ######################################## connect to
> database####################################import os, traceback,
> datetimetry:    from gluon.contrib.gql import *         # if running
> on Google App Engineexcept:    db=SQLDB("mysql://root:localhost/
> db")         # if not, use SQLite or other DBelse:    db=GQLDB
> ()                              # connect to Google BigTable
> session.connect(request,response,db=db) # and store sessions
> there###################################
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to