Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

TSQLWebDataProvider setting Params

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

I'm trying to set params for a query contained in
TSQLDBWebDataProvider's SelectSQL property.

The query is similar to this:

select * from table where field=:Field

I set the param value with this code:

myDataProvider.Params.ParamByName('Field').Value := 1;

But it doesn't seems to be assigned.

Any hint?.

Reply by email

Leonardo M. Ramé
to Leonardo M. Ramé
Leonardo M. Ram? wrote 14 lines
I'm trying to set params for a query contained in TSQLDBWebDataProvider's SelectSQL property. The query is similar to this: select * from table where field=:Field I set the param value with this code: myDataProvider.Params.ParamByName('Field').Value := 1; But it doesn't seems to be assigned. Any hint?.

The problem was that .Value is a variant field, it apparently doesn't work. Setting to AsInteger or AsString works as expected.

Reply by email