Re: FieldByRealName
From: Vitali Kalinin (vitkalinin_at_yahoo.com)
Date: 01/24/05
- Next message: Bernard Taylor: "Updating Access database used by ISAPI DLL"
- Previous message: Sergey Amanov: "Re: FieldByRealName"
- In reply to: Sergey Amanov: "Re: FieldByRealName"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 Jan 2005 17:45:34 +0200
Ado Field object has dynamic properties named "BASETABLENAME" and
"BASECOLUMNNAME". I believe that
is exactly what you are looking for. Hovewer I am not sure that this
property will be exposed by all providers.
"Sergey Amanov" <a@a.com> сообщил/сообщила в новостях следующее:
news:41f50fb7@newsgroups.borland.com...
> Ray thanks for your answer.
> In effect I don't know alias name, I know only real name because I read
sql
> from Db. 'REAL_FIELD_NAME' must be used in sql but 'FIELD_ALIAS_NAME' can
be
> changed by user.
>
> "Ray Marron" <me@privacy.net> wrote in message
> news:41f5078a$1@newsgroups.borland.com...
> > "Sergey Amanov" <a@a.com> wrote in message
> > news:41f50638@newsgroups.borland.com...
> >> Hi,
> >>
> >> Is there any way to call field REAL name when using alias?
> >>
> >> Ex:
> >> ADOQuery1.Sql.Text := 'SELECT REAL_FIELD_NAME ''FIELD_ALIAS_NAME'' FROM
> >> TABLE_NAME';
> >> ADOQuery1.Open;
> >>
> >> ADOQuery1.FieldByName('FIELD_ALIAS_NAME').AsString; //no error
> >> ADOQuery1.FieldByName('REAL_FIELD_NAME).AsString; //run time error
but
> >> I
> >> want to call this
> >
> > I don't think you can do this, as the dataset has only one field and it
is
> > known by the alias. You could include the field a second time under the
> > original name, but that seems wasteful. I take it the SQL query is not
> > under your control? If you're building it yourself, you already know
the
> > real/alias names and should be able to convert fairly easily.
> >
> > --
> > Ray Marron
> >
> >
>
>
- Next message: Bernard Taylor: "Updating Access database used by ISAPI DLL"
- Previous message: Sergey Amanov: "Re: FieldByRealName"
- In reply to: Sergey Amanov: "Re: FieldByRealName"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|