Closed GoogleCodeExporter closed 9 years ago
Also, the DB.pas version of FieldByName raises an exception if there is no
match. The dwsDatabase version returns nil, which causes unexpected failures
to be harder to debug because the problem is not detected until a later point
in the code's execution.
Original comment by masonwhe...@gmail.com
on 13 May 2013 at 10:34
I haven't been using DB.pas for years, but isn't that a bug of DB.pas? Cf.
http://stackoverflow.com/questions/153944/is-sql-syntax-case-sensitive column
names are case-sensitive in many situations, and ORM DBs built for
case-sensitive languages is one case where I encountered a need for
case-sensitivity years ago.
For the exception, I see that it's FindField that doesn't raise the exception
while FieldByName does. I'll change that.
Original comment by zar...@gmail.com
on 14 May 2013 at 6:23
Exception, FindField & unit test added.
Original comment by zar...@gmail.com
on 14 May 2013 at 6:55
According to the linked SO question, in the SQL standard, column names are case
insensitive but some databases don't implement it properly.
From personal experience, in MS SQL Server and in Firebird, the two DBMSs I'm
most familiar with, column names are case insensitive. But more to the point,
in Pascal, identifiers are case insensitive, which, combined with the behavior
of DB.pas, means that this is definitely expected behavior for Delphi users.
Original comment by masonwhe...@gmail.com
on 14 May 2013 at 3:05
This issue was closed by revision r2086.
Original comment by zar...@gmail.com
on 15 May 2013 at 8:29
Column names are case insensitive in most db's, however, in Postgres, you can
define your column as "MyKinkyColumn", whenever you refer to it, you must type
it's name between double-quotes, otherwise the engine will complain that it
can't find it.
Original comment by duminica...@gmail.com
on 16 May 2013 at 4:38
FWIW the first case-sensitive database I encountered was an MS SQL one, where
it seems that for some locales, case sensitive is the default after
installation.
Original comment by zar...@gmail.com
on 16 May 2013 at 6:20
Original issue reported on code.google.com by
masonwhe...@gmail.com
on 13 May 2013 at 10:08