Re: Multiple Step Operation - THE TRICK!
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Thu, 26 May 2005 19:28:40 -0500
>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?
Having a dataset the returns field values that don't match the persistent
tfields that you have saved is the most common cause.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- References:
- Multiple Step Operation
- From: arper
- Re: Multiple Step Operation - THE TRICK!
- 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 - THE TRICK!
- Next by thread: Can you use a WITH statement in TADOQuery?
- Index(es):