Re: TIBQuery2.Assign(TIBQuery1) doesn't work



Nick Alexander wrote:
I am tryng to create a TIBQuery at runtime which must have the same
calculated fields as a TIBQuery I have already created at design time.
  If I try to assign the design one to the runtime one, I get an error
at runtime saying cannot assign a TIBQuery to a TIBQuery.   What am I
not uderstanding here?
Post a follow-up to this message

"Assign" in VCL does a number of differnet things - some of them which are not at all obvoius. I would expect that Query1.Assign(Query2) to generate an error. If not, I'd be *really* curious to see what the outcome of such an operation would be.
The most probable would be an attempt to assign field values from Query2 to Query1, or maybe setting the input parameters if such existed.


To achieve what you want, try TClipboard.SetComponent/GetComponent.

Bjorge
.