From: Jim Weirich Date: 2002-11-12T14:12:11+09:00 Subject: Re: Problem with a select in Oracle On Mon, 2002-11-11 at 23:37, Gavin Sinclair wrote: > I very much doubt that there is a problem with the '@' character. What data > type is your email address in the database? One gotcha with DBI is that > queries always return Strings. That's not entirely true. It tends to be dependent upon the database driver being used (this recently came to my attention). The PostgreSQL driver very carefully converts the SQL data types to native Ruby types. Evidently the Oracle driver does not do this. This is a major incompatibility in the drivers that should be ironed out (IMHO). > I recommend the following things: [... strong agreement with the given list, with comments on ...] > - convert the row to a hash (row.to_h) so you know exactly what > you're dealing with I almost never do this. Do you do this because you use hash methods that aren't supported on a row object? The original intent was that the row would look sufficiently like a hash so that you wouldn't have to convert it. If still feel the need, perhaps it is not "sufficient" enough. -- -- Jim Weirich jweirich@one.net http://w3.one.net/~jweirich --------------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)