Re: How can i get the "true" name of an aliased field?
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Thu, 15 Nov 2007 09:33:46 -0500
Patrick wrote:
Does any anyone know how can I get the real name of a field when usingA post by ekkehard in another thread gave me another idea, but it will
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 ?
require you to be rigid in your coding practices:
Use rs.Source to get the sql statement that was used to populate the
recordset, and parse the statement for the "real name" of the field. Are
you familiar with regular expressions? It could be done with builtin
vbscript string functions, but many would declare that using regex is
easier and more efficient. Different strokes and all that...
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Follow-Ups:
- Re: How can i get the "true" name of an aliased field?
- From: ekkehard.horner
- Re: How can i get the "true" name of an aliased field?
- References:
- How can i get the "true" name of an aliased field?
- From: Patrick
- How can i get the "true" name of an aliased field?
- Prev by Date: Re: How to summarize recordset...Select Distinct alternative?
- Next by Date: Re: How can i get the "true" name of an aliased field?
- Previous by thread: Re: How can i get the "true" name of an aliased field?
- Next by thread: Re: How can i get the "true" name of an aliased field?
- Index(es):
Relevant Pages
|