[fpc-devel] TField.FieldName: how about database and table names?
Leonardo M. Ram�
martinrame at yahoo.com
Wed Apr 18 23:57:37 CEST 2007
Bram, suppose myTable has two fields, "name" and "age", the query should return something like
this:
name|age|name1|age1
----+---+-----+----
aa | 11| aa| 11
Each TField is related to one column in the resultset, not to each table involved in the query.
--- Bram Kuijvenhoven <kuifwaremailinglists at xs4all.nl> wrote:
> Hi!
>
> The TField class from the db unit defines a FieldName. When using SQL queries, columns in the
> result set can be fully qualified using the form 'database.table.field'. Apparently FieldName
> only constitus the latter part.
>
> When using an SQL query like
>
> SELECT * FROM myTable AS t1, myTable AS t2
>
> how should one distinguish between t1.aField and t2.aField when using TField?
>
> Is there currently a feature for this in the data model, or should we perhaps add two additional
> properties -- DatabaseName and TableName -- to a TSQLField (and TSQLFieldDef) descendant? (which
> then could be used by SQLDB etc.)
>
> Regards,
>
> Bram
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the fpc-devel
mailing list