--- Begin Message ---
I am trying to connect to a PostgreSQL database from Pharo but I keep getting
"SubscriptOutOfBounds: 11" error (I am a beginner). The server is started
and the database is working fine. What am I missing?


|connectionArguments connection resultSets resultSet rows firstRow|

connectionArguments := PG3ConnectionArguments new 
        hostname: 'localhost'; 
        port: 5432; 
        username: 'postgres'; 
        password: 'lucian'; 
        databaseName: 'mydb' 
        yourself.
connection := connectionArguments newConnection. 

connection startup.

resultSets := connection execute: 'select 3 + 4, now()'. 
resultSet := resultSets first.
rows := resultSet rows.
firstRow := rows first.
firstRow at: 1.
firstRow at: 2.

connection terminate.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html


--- End Message ---

Reply via email to