From: Angelo Farias Date: 2011-09-10T03:06:49+09:00 Subject: null pointer given - hash ------=_NextPart_000_0040_01CC6F01.3A7C8030 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable each and fetch hash doesn=E2=80=99t work, result showing: = =E2=80=98fetch_hash=E2=80=99: NULL pointer given (Argument error). Only = res.each works. while row =3D res.fetch_hash do printf "%s, %s\n", row["name"], row["category"] end puts "Number of rows returned: #{res.num_rows}" or res.each_hash do |row| printf "%s, %s\n", row["name"], row["category"] end Thanks in advance Angelo ------=_NextPart_000_0040_01CC6F01.3A7C8030--