Board index » delphi » Linker removes SQL parameter statement, Why?

Linker removes SQL parameter statement, Why?

Can anyone tell me why the following statement would be removed by the
Linker?

       ItemQuery.Params[0].Value := Providers.Fields[0].Value;

Inside the de{*word*81} the evaluator gives this message:
"Function to be called, TParam.GetAsVariant, was eliminated by linker"

I can't figure this out. Anybody have any ideas?
John lee.

 

Re:Linker removes SQL parameter statement, Why?


Hi John,

Params must be accessed by the AsXXXXX method appropriate to the data
type (eg. AsString, AsInteger etc), whereas Fields can be accessed with
Value.

Cheers,
Carl.

Quote
John Lee wrote:

> Can anyone tell me why the following statement would be removed by the
> Linker?

>        ItemQuery.Params[0].Value := Providers.Fields[0].Value;

> Inside the de{*word*81} the evaluator gives this message:
> "Function to be called, TParam.GetAsVariant, was eliminated by linker"

> I can't figure this out. Anybody have any ideas?
> John lee.

Other Threads