Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 11 of 11 total
Thread ParamByName
Wed, Jan 18 2017 2:19 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter and Ronald,

<< I was wrong - test - Forget that idea...  if only worked with AsInteger ... >>

The key here is that parameters *do not* work like fields in this respect.  Using As<DataType> with parameters will result in the parameter type being set to that particular type.

You *can*, however, use the Value property to do what you want.

MyQuery.Params.ParamByName('tag').DataType := ftInteger;
MyQuery.Params.ParamByName('tag').Value := '100';

and it should work just fine, using the built-in variant conversions in Delphi to determine the rules of whether a type can be converted to another before being sent on to the DBISAM engine for actual usage.

Tim Young
Elevate Software
www.elevatesoft.com
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image