I have an TADOQuery that selects * from a table and I have added persistant fields. All works fine with viewing and inserting new records, but when I add a persistant field of the type fkLookup and try to insert e new record I get a Debugger Exception Notification EOleException: An unknown error has occured. This pops up for every field in the insert.
This is the text from the unit:
object qWebLinksTypeLookup: TStringField
DisplayLabel = 'Type'
FieldKind = fkLookup
FieldName = 'TypeLookup'
LookupDataSet = qWebLinkTypes
LookupKeyFields = 'ID'
LookupResultField = 'TypeName'
KeyFields = 'LinkType'
Lookup = True
The error does not occur if the lookup field is not there. Any idea what I am doing wrong?