Delphi 4 with ADO

Quote
>rs.Fields.Item[0].Value ..????

I don't know why you always get a zero, but you really should use names
instead of indexes.

Try this:

MyInteger := VarAsType(rs.Fields['MyPrimaryKey'].Value, varInteger);

or this:

MyInteger := Round(rs.Fields['MyPrimaryKey'].Value);

Hans Olav. :-)