Re: How can i get the "true" name of an aliased field?



Patrick wrote:
Does any anyone know how can I get the real name of a field when using
aliases ?
I'm opening an ADO recordset with an SQL string which goes something
like
"SELECT Surname & ' ' & Name as Operator FROM People"
I'm doing this mainly for descriptive reasons, but I also need the
true source of the field ( = Surname & ' ' & Name).
DAO used to have the SourceField() method, which is not supported by
ADO.
Is there an alternative ?


Not that I've ever seen. You will need to store this information somewhere
in your application. You could even make it part of your sql statement:

SELECT Surname & ' ' & Name as Operator, " & _
"'Surname & Name' As OperatorSource ... "
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: How can i get the "true" name of an aliased field?
    ... I'm opening an ADO recordset with an SQL string which goes something ... Use rs.Source to get the sql statement that was used to populate the ... Please reply to the newsgroup. ...
    (microsoft.public.data.ado)
  • Re: Maximum length SQL ".. not in .."
    ... Or of the SQL string as such? ... inner join tblcriteria ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: ADO find method performance
    ... the ado recordset. ... Can you not modify the sql statement used to retrieve the records to only ... The database engine (what database are you using ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Perform SQL command on Disconnected ADO Recordset
    ... I have an ADO recordset that I created by declaring it as new and ... perform a SQL string on it to do aggregation and other things that SQL ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • How can i get the "true" name of an aliased field?
    ... I'm opening an ADO recordset with an SQL string which goes something ...
    (microsoft.public.data.ado)