From: "Dwayne Smurdon @ DNA Media Pro" Date: 2003-02-02T19:58:14+09:00 Subject: hash question... This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C2CA7F.B36233D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit map.keys.each |a| { person.a = rs.Fields(map[a]).Value } produces this error: D:/Apps/Ruby/projects/OutlookContact.rb:29: odd number list for Hash Can anyone help? I'm not sure what this error message means. I'm still getting used to Ruby syntax, so I might be doing something VERY wrong. Below is the entire method :) -Dwayne *** Here's the entire method, which doesn't compile. def addContact3 (rs) person = @@contactFolder.Items.add( 2 ) 1.upto(rs.RecordCount) { map.keys.each |a| { person.a = rs.Fields(map[a]).Value } } rs.moveNext end ------=_NextPart_000_0006_01C2CA7F.B36233D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hash question...

map.keys.each  |a| { person.a =3D = rs.Fields(map[a]).Value }
produces this error:

D:/Apps/Ruby/projects/OutlookContact.rb:29: odd number = list for Hash


Can anyone help?  I'm not sure what this error = message means.  I'm still getting used to Ruby syntax, so I might = be doing something VERY wrong. Below is the entire method :)

-Dwayne



*** Here's the entire method, which doesn't = compile.

def addContact3 (rs)
  person =3D @@contactFolder.Items.add( 2 = )
  1.upto(rs.RecordCount) {
    map.keys.each  |a| { person.a = =3D rs.Fields(map[a]).Value } 
  }     
  rs.moveNext
end


------=_NextPart_000_0006_01C2CA7F.B36233D0--