From: Raimon Fs Date: 2009-02-25T02:29:04+09:00 Subject: updating row with pg => success or failure Hello, I'm playing a little with the pg of Ruby, and I'm accessing some postgresql database. I want to update some rows, but I can't find the method/command to know if they were updated or not. For a normal select: res = conn.exec('SELECT id, type FROM scanns WHERE ftp=true') print 'records found: ',res.ntuples(),"\n" but when updating, I can't use the ntuples() or at least it returns always zero. my rows are updated, I can check it with another tool. conn.transaction { row_update = conn.exec('UPDATE scanns SET ftp=false WHERE id=xxxxx']) print 'records found updating: ',row_update.ntuples(),"\n", "\n" } wich command I have to use ? I have the latest RDoc documentation, but can't find it ... thanks, r. -- Posted via http://www.ruby-forum.com/.