Fernando, I appreciate your suggestion to add the port number in the
connection string.

Massimo, thank you for explaining why SQLDB shouldn't be used. I
modified the connection string per your suggestion (to use DAL & port
#), and it worked.

Thank you again
David

On Apr 16, 5:43 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> 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 <fvillarr...@yahoo.com> 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 <dlawre...@focusedconcepts.com> wrote:
>
> > > From: Dave <dlawre...@focusedconcepts.com>
> > > Subject: [web2py] Unable to create DAL connection to PostgreSQL on 
> > > WebFaction
> > > To: "web2py-users" <web2py@googlegroups.com>
> > > 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