Re: Multiple Step Operation - THE TRICK!
- From: "arper" <support@xxxxxxxx>
- Date: 26 May 2005 04:21:12 -0700
This is even worse, stupidly worse that one could think...
Let's see the situation:
I got a DBGrid with lookupfields from where the enduser can
dynamically select a value (say, 'designation) from a table.
Inturn, selecting a value from the LookupResultField returns a
coded value in another field (say, 'Code').
While creating a new record, I had that Multiple-Step Operation
error while attempting to select a value from the drop-down
list (within the DBGrid). Of course, I suspected uninitialized
values to cause the error, so I fixed that in the OnNewRecord
event of the TADOTable, giving 'Code' a known - not null value.
Even though... I then suspected some type mismatch
(OLEVarriants etc...) so I carrefully typecasted assignated
params... still the same.
No, falks, if you face that same problem, don't look for a
solution within the code: just set the DisplayWidth property
of the LookupField to a larger value, so that the internally
called Lookup method of the Dataset takes the entire String
('designation') otherwise it gets truncated... and do not
return a valid result.
Unbelievable? So did I say, just try out and tell me I'm wrong..
Still, what DO actually generate this exception?... Seems generic?
.
- Follow-Ups:
- Re: Multiple Step Operation - THE TRICK!
- From: Brian Bushay TeamB
- Re: Multiple Step Operation - THE TRICK!
- References:
- Multiple Step Operation
- From: arper
- Multiple Step Operation
- Prev by Date: Re: Indices and client data sets
- Next by Date: Re: Finding a record in a TADOTable
- Previous by thread: Re: Multiple Step Operation
- Next by thread: Re: Multiple Step Operation - THE TRICK!
- Index(es):