On Thursday 16 November 2006 19:01, you wrote:
> Hi:
>   Thanks for your kindly replies here's the handy
> python script :
> -----------------------------------------
> import psycopg2
>
> try:
>        conn = psycopg2.connect("dbname='testdb'
> user='rails' host='localhost' password='rails'");
> except:
>        print "I am unable to connect to the database"
> cur = conn.cursor()
> try:
>        cur.execute("select * from photos")
>        rows = cur.fetchall()
>        for row in rows:
>          print "   ",row[0],"  ", row[1]
> except:
>    print "I can't fetch anything."
> -------------------------------------------------------
> and here's the result >>>
>        11 askdfjiadfj
>        1 aaaaaaa
>
>
> and yes I'm using the port '5432' for stand-alone
> machine so they're all together .


Well lets figure out what is going wrong!  My guess is this is a small issue 
and we should be able to determine what is breaking.  So lets start with the 
following steps:

1. run CxnEditor.py
2. fill in the required fields.
3. click the test button.
4. do a ctrl-d (a debug window should open)
5. in the top section of the debug window type 
"self.connDict[self.currentConn]"
6. the results will be on the bottom section
7. send the list the results

Also you failed to provide the version of windows you are running! 

You should reply to the list.  That way others can benefit from the 
discussion.  

PS. try changing the "localhost" to "127.0.0.1"

John 






_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to