perhaps to

dbpg = DAL('postgres://dlawrence_test1:****@localhost:5432/
dlawrence_test1')

SQLDB is an alias for DAL for backward compatibility. Do not use it.


On Apr 16, 3:05 pm, FERNANDO VILLARROEL <[email protected]> wrote:
> Hi
>
> Change
>
> dbpg = DAL('postgres://dlawrence_test1:****@localhost/dlawrence_test1')
>
> to:
>
> dbpg = SQLDB('postgres://dlawrence_test1:****@localhost:5432/dlawrence_test1')
>
> Regards.
>
> --- On Sat, 4/16/11, Dave <[email protected]> wrote:
>
>
>
>
>
>
>
> > From: Dave <[email protected]>
> > Subject: [web2py] Unable to create DAL connection to PostgreSQL on 
> > WebFaction
> > To: "web2py-users" <[email protected]>
> > Date: Saturday, April 16, 2011, 4:15 PM
> > I am building my website using web2py
> > on WebFaction. I have a
> > PostgreSQL database on WebFaction called dlawrence_test1.
>
> > When I attempt to create a connection to that database
> > using the
> > web2py shell as described in the manual, the command
> > executes without
> > any errors. But when I try to access the connection
> > variable, an error
> > message reports that the connection variable is not
> > defined.
>
> > Can anyone explain this and tell me what I am doing
> > incorrectly? Thank
> > you.
>
> > [note: my database password is represented by ****]
>
> > ------- web2py shell -----
> > In[0]:     dbpg =
> > DAL('postgres://dlawrence_test1:****@localhost/
> > dlawrence_test1')
>
> > Out[0]:
>
> > In[1]:     print dbpg._name
>
> > Out[1]:
> > Traceback (most recent call last):
> >   File "<input>", line 1, in <module>
> > NameError: name 'dbpg' is not defined

Reply via email to