Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Cannot access index field '__RowID'.
Tue, Jul 20 2010 6:30 AMPermanent Link

Aaron Christiansen

I am trying to set up a master--detail relationship between 2 tables, and when I click the [...] ellipsis of the Masterfields property in the object inspector, this error message appears.

One of the tables is already the detail of a Master-Details relationship, so I know it has indexes and they work.

The other table also has an index.

I searched and this does not appear to have been reported before?

I copy & pasted the detail below.

Thanks
Aaron

---------------------------
Error
---------------------------
Cannot access index field '__RowID'.
---------------------------
OK   Details <<   
---------------------------
[5067E82C]{dbrtl140.bpl} DB.DatabaseError (Line 2885, "DB.pas" + 3) + $E
[5002974A]{rtl140.bpl  } SysUtils.Format (Line 10039, "SysUtils.pas" + 1) + $7
[5067E8A1]{dbrtl140.bpl} DB.DatabaseErrorFmt (Line 2891, "DB.pas" + 1) + $15
[0D8A76E6]{edb203r2010run.bpl} Edbcomps.TEDBTable.GetIndexField + $B6
[0D6FA41F]{edb203r2010design.bpl} Edbregister. + $0
[22AEDF73]{dcldb140.bpl} FldLinks.TLinkFields.IndexListChange (Line 359, "..\..\db\FldLinks.pas" + 9) + $14
[22AEDE22]{dcldb140.bpl} FldLinks.TLinkFields.Initialize (Line 340, "..\..\db\FldLinks.pas" + 24) + $4
[22AED959]{dcldb140.bpl} FldLinks.TLinkFields.Edit (Line 260, "..\..\db\FldLinks.pas" + 1) + $2
[22AED761]{dcldb140.bpl} FldLinks.EditMasterFields (Line 165, "..\..\db\FldLinks.pas" + 5) + $3
[50690CD3]{dbrtl140.bpl} DB.TDataSet.SetActive (Line 11313, "DB.pas" + 22) + $E
[22AED8A5]{dcldb140.bpl} FldLinks.TFieldLinkProperty.Edit (Line 227, "..\..\db\FldLinks.pas" + 1) + $9
[0D6FA33F]{edb203r2010design.bpl} Edbregister. + $0
[2096A036]{coreide140.bpl} PropInsp.TPropertyInspector.PropListEditDblClick (Line 869, "PropInsp.pas" + 20) + $5
[20EB2F8D]{vclide140.bpl} IDEInspListBox.TInspListBox.DoEditDblClick (Line 617, "IDEInspListBox.pas" + 2) + $A
[20EB4D57]{vclide140.bpl} IDEInspListBox.TInspListBox.ListButtonClick (Line 1307, "IDEInspListBox.pas" + 2) + $2
[50296367]{vcl140.bpl  } Controls.TControl.Click (Line 7178, "Controls.pas" + 9) + $8
[20EAA93A]{vclide140.bpl} IDEListBtns.TListButton.WMLButtonUp (Line 582, "IDEListBtns.pas" + 8) + $11
[50295DFC]{vcl140.bpl  } Controls.TControl.WndProc (Line 7062, "Controls.pas" + 91) + $6
[50010B7D]{rtl140.bpl  } System.TInterfacedObject._AddRef (Line 22076, "System.pas" + 1) + $3
[50009E7C]{rtl140.bpl  } System.TObject.GetInterface (Line 9642, "System.pas" + 8) + $A
[50009EEA]{rtl140.bpl  } System.TObject.GetInterface (Line 9650, "System.pas" + 16) + $10
[50299F53]{vcl140.bpl  } Controls.TWinControl.IsControlMouseMsg (Line 9596, "Controls.pas" + 1) + $9
[50010B5B]{rtl140.bpl  } System.TInterfacedObject.QueryInterface (Line 22068, "System.pas" + 1) + $8
[208CDE5D]{coreide140.bpl} DocModul.TCodeIDocModule.QueryInterface (Line 2600, "DocModul.pas" + 8) + $9
[5029A6C0]{vcl140.bpl  } Controls.TWinControl.WndProc (Line 9819, "Controls.pas" + 144) + $6
[50299D60]{vcl140.bpl  } Controls.TWinControl.MainWndProc (Line 9540, "Controls.pas" + 3) + $6
[50076360]{rtl140.bpl  } Classes.StdWndProc (Line 13014, "Classes.pas" + 8) + $0
[502C98F5]{vcl140.bpl  } Forms.TApplication.StopHintTimer (Line 10515, "Forms.pas" + 3) + $6
[502C8749]{vcl140.bpl  } Forms.TApplication.ProcessMessage (Line 9784, "Forms.pas" + 30) + $1
[502C878E]{vcl140.bpl  } Forms.TApplication.HandleMessage (Line 9814, "Forms.pas" + 1) + $4
[502C8AB9]{vcl140.bpl  } Forms.TApplication.Run (Line 9951, "Forms.pas" + 26) + $3
[0042D94A]{bds.exe     } bds.bds (Line 200, "" + 8) + $FFFB
Tue, Jul 20 2010 7:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Aaron


One of the tables is already in a master-detail relationship so we know that master-detail works. So questions:

1. do you have a field __RowID in the table?
2. do you have some persistent fields but not __RowID?

Roy Lambert [Team Elevate]
Tue, Jul 20 2010 10:06 AMPermanent Link

Aaron Christiansen

1. No, there is no such field called "__RowID" defined in any of my tables, never has been, never will.

I do not understand 2.
Tue, Jul 20 2010 1:29 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Aaron


>1. No, there is no such field called "__RowID" defined in any of my tables, never has been, never will.

I thought there wouldn't be (it does have the look of an internal thing of Tim's or CodeGear's) but wanted to make sure

>I do not understand 2.

If you define persistent fields using the field editor (double click the table)  then any that aren't defined as persistent fields effectively become invisible and as far as Delphi is concerned don't exist.

Looking at the error report you're on D2010 ElevateDB 2.03 unicode? version?. I'm on D2006, ElevateDB 2.03b17 non-unicode so me offering to look at the tables would almost certainly be a waste of time but it would probably help Tim if you can post a copy of the catalog and tables involved to the binaries newsgroup.

I've had a look at the source in edbcomps. If I'm reading the error report correctly I think [0D8A76E6]{edb203r2010run.bpl} Edbcomps.TEDBTable.GetIndexField + $B6 is where the error is coming from but I can't see anything that looks as though it can return a non-field.

The only other thing I can suggest is if you haven't already try a repair of the tables involved. If that doesn't work its down to Tim.

Roy Lambert [Team Elevate]
Wed, Jul 21 2010 12:35 AMPermanent Link

Aaron Christiansen

For whatever reason, I had named the index "Primary".

I renamed the index to something else and it now works fine.

Huh!?
Wed, Jul 21 2010 3:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Aaron

>For whatever reason, I had named the index "Primary".

>I renamed the index to something else and it now works fine.

That one would never have occurred to me. I presume it was the primary key and you just went with the flow Smiley

Roy Lambert [Team Elevate]


Wed, Jul 21 2010 5:27 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Aaron,

<< I am trying to set up a master--detail relationship between 2 tables, and
when I click the [...] ellipsis of the Masterfields property in the object
inspector, this error message appears. >>

__RowID is the internal/hidden row ID column for an EDB table, and is used
for the primary key when you don't define a primary key on a table.
Unfortunately, the M-D linkage dialog doesn't know this, so it tries to
access it as a normal TField and causes this error.

If you have tables that don't have primary keys, just set the MasterFields
manually and that should work around this.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image