Michael Blewett writes:
Select Column1, Column2 etc from TableA.
Instead I must use the AS statement ie
Select Column1 AS Column1, Column2 AS Column2 from TableA. Zope should not be responsible for this strange behaviour.
It simply executes the SQL statement and asks the result for the result column names. It then wraps each result row in an object that allows to access a column value as attribute under the respective column name. You could try: <dtml-let SQLresult=SQLMethod> <dtml-var "SQLresult.names()"> </dtml-in> to get the list of column names your Z SQL Method "SQLMethod" returns. This may give you a hint how your database names result columns. I recently found out that Oracle returns column names converted into all uppercase. I needed about 2 hours to analyse this weird behaviour. Dieter
On Sat, 1 Jul 2000, Dieter Maurer wrote:
I recently found out that Oracle returns column names converted into all uppercase. I needed about 2 hours to analyse this weird behaviour.
That's actually not too weird. Solid does the same thing. It is a standard "feature" of SQL-89 that column names are case-insensitive and stored as upper case. You can force it to use mixed-case and spaces by quoting the column names with quotation marks. Of course, you have to do this when you CREATE TABLE. i.e. SELECT "weird but legal" FROM t selects the column named "weird but legal" from table t. MySQL, OTOH, is case-sensitive on column names. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!"
participants (2)
-
Andy Dustman -
Dieter Maurer