I am attempting to connect to a mysql db using the following:

def mydb():
    db = SQLDB("mysql://etelford:bulabu...@localhost:3306/etelford")
    r = db().select(db.tblAccounts.ALL)
    return r

however, I receive this error:

KeyError: 'tblAccounts'

I am able to make the db connection and I can successfully able to use
sqlexecute to perform the following SELECT.

def mydb():
    db = SQLDB("mysql://user:passw...@localhost:3306/thedbname")
    r = db.executesql('select * from tblAccounts')
    return r

I've tried different variations on my first def, but with no luck.
Where am I going wrong in my first bit of code?

Thanks,
ET

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

Reply via email to