Board index » delphi » Hair-pulling problem w/ADO & lookup fields

Hair-pulling problem w/ADO & lookup fields

Folks,

Going crazy trying to use more than one lookup field in an ADODataSet.

DataSet is a simple SQL select with 5 fields; add one new lookup field, test
in a grid and life is good.  Add a second field and either get
'EOleExeception: An unknown error has occurred' or 'EVariantError: Invalid
variant type conversion'.  Former message is more frequent.

Now, I can remove either one of the lookup fields and everything works as
expected, but as soon as I add back the second field the error returns.

Once the errors are cleared, I can enter and save data just fine, including
the looked up values.

If there is no other answer, how do I trap for this?  Should I just trap and
ignore?

Regards,

Peter Ristau
Relational Solutions Inc.

 

Re:Hair-pulling problem w/ADO & lookup fields


Quote
>DataSet is a simple SQL select with 5 fields; add one new lookup field, test
>in a grid and life is good.  Add a second field and either get
>'EOleExeception: An unknown error has occurred' or 'EVariantError: Invalid
>variant type conversion'.  Former message is more frequent.

This should only be a problem when run from the IDE.  Either ignore it or set
lookupCache to true
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads