[Newbies] Postgress Database connection

cdrick cdrick65 at gmail.com
Tue May 9 15:07:35 UTC 2006


Hi again...

I'm triing to connect to a remote postgres db without success...

I've use several framework

***Jim-PostgresSql ***

| client |
    client := PSQLClient new database: 'sup_prev'; user: 'web'.
    client establishConnection.
client closeConnection.

wich give an unknown message type $# (<- a square - maybe an encoding
problem ?? )  aBiteArray(14)
in PSQLBackendMessage class>>readFrom: with:
... class := FactoryClassDict at: id ifAbsent: [self error: 'unknown message
type ', id printString, ' (', id asInteger printString, ')'

***After, I've tryed PostgresV2***
something like... ( with configuration done on the class side:
buildDefaultConnectionArgs )

|conn|
conn := PGConnection new.
conn .
conn startup.
conn execute: 'select * from experiences'.
conn terminate.
    ^ resultStream contents.
I get an error saying connection not valid - isConnected returning false :s
I probably missed something...

***After I tryied to use ODBC but without success too... :s   I don't know
the dns for postgres...***

Can anyone tell me wich tool(package) to use preferably with postgres ?
because I'm a bit lost at the moment :). Also, if you see what are the
problems in my connections attempts

Thanks for all

Cédrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060509/96b2f3ba/attachment.htm


More information about the Beginners mailing list