... or might it even be so, that good praxis is when using field
names, to always use the AS clause, even if no table-alias are used?
Like:
rs=db.SQLSelect("SELECT x AS x FROM t")
zstring=rs.Field("x").StringValueLennart Ramberg On Fri, Jul 31, 2009 at 3:12 PM, Lennart Ramberg<[email protected]> wrote: > Thanks for quick responses, > > Actually, removing DISTINCT removes the problem, but anyway, as I > understand, I should always use the AS clause when using alias to be > on the safe side, right? > > Lennart Ramberg > > On Fri, Jul 31, 2009 at 2:40 PM, Igor Tandetnik<[email protected]> wrote: >> Lennart Ramberg wrote: >>> dim rs as RecordSet >>> rs=dbEta.SQLSelect("SELECT DISTINCT V.resanr,C.namn"_ >>> +" FROM Voyages V,Category C WHERE C.kategorinr=V.kategorinr") >>> >>> dim namnstr as string >>> >>> namnstr=rs.Field("namn").StringValue 'I get a NilObjectException >>> here in 3.6.0 ... >>> namnstr=rs.Field("C.namn").StringValue '... but not here. >> >> Unless explicitly specified with AS clause in the statement, column >> names are implementation-defined and subject to change without notice. I >> believe the algorithm did change between 3.6.0 and 3.6.3. But you >> shouln't have been relying on them in the first place. >> >>> Yes, at sqlite.org I read: >>> "SQLite version 3.6.3 fixes a bug in SELECT DISTINCT that was >>> introduced by the previous version." >>> So that shouldn't be it, since it was introduced in 3.6.2, right? >> >> I don't believe this issue has anything to do with DISTINCT. I'm pretty >> sure the problem will remain if you remove DISTINCT. >> >> Igor Tandetnik >> >> >> >> _______________________________________________ >> sqlite-users mailing list >> [email protected] >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

