Page 1 of 1
How I may see rowid?
Posted: Fri 03 Aug 2012 07:10
by sinys
Delphi XE2, ODAC 8.2.7
Code: Select all
OraQuery1.Sql.text := 'select t.rowid, t.rowid as "myrowid", t.* from username.tablename t';
OraQuery1.Open;
I see all columns (t.*) without 2 rowid columns (rowid and "myrowid") in DBGrid.
What I did not do?
Or this is bug?
Re: How I may see rowid?
Posted: Fri 03 Aug 2012 08:46
by AlexP
hello,
Since this field is "service", its visible property is set to False, if you want to display such fields, you should add these fields in the editior:
OraQuery.Fields - > Add All Fields
Re: How I may see rowid?
Posted: Fri 03 Aug 2012 10:25
by sinys
My dataset is dynamic and sql statement in this dataset can be any, and should not be have design time fields.
1) How I can do this in runtime after dataset.open?
2) May be necessary to add a property for this (ShowServiceFields)?
Re: How I may see rowid?
Posted: Fri 03 Aug 2012 11:36
by AlexP
hello,
1) For displaying this fields after opening the table, you should set the Visible property of this fields to true
OraQuery1.Open;
OraQuery1.FieldByName('ROWID').Visible := true;
2) We will review the possibility to add such option in the future.
Re: How I may see rowid?
Posted: Mon 01 Sep 2014 15:56
by dados
Hi AlexP,
Have you guys created anything to allow "service fields" to have the visible property set to true by default?
And also is there a way to check if a field is a service field?
If I execute a statement like this "select rowid as RW from dual" you guys know that RW is a alias for the service field rowid.
Is there a way to know original field name and alias name?
Re: How I may see rowid?
Posted: Tue 02 Sep 2014 12:49
by AlexP
Hello,
To retrieve the real field name, you can use the following code:
Code: Select all
TDBAccessUtils.GetIRecordSet(OraQuery1).Fields[0].ActualName;
We have added the HideRowId option (True by default), that is responsible for displaying the ROWID field. This option will be included in the next version..
Re: How I may see rowid?
Posted: Tue 02 Sep 2014 14:24
by dados
Excellent thanks
Re: How I may see rowid?
Posted: Thu 04 Sep 2014 11:14
by AlexP
If you have any further questions, feel free to contact us.