Diman
Admin
 Admin
| Posts: 1478 |  | Karma: 18 |
|
Re:parameter definition changed
|
|
Posted: 2007/10/03 07:18 |
|
|
|
|
Hello
1) After ADStoredProc1.Prepare call, Params[0] has data type, as this parameter is recognized by AnyDAC. For example ftFmtBCD. When you assign a value to the parameter using one of AsXXXX methods, they are implicitly changing parameter data type. For example AsInteger changes to ftInteger. And if parameter data type is changed, then dataset must be reprepared.
2) To avoid this, use Params[0].Value := 1 instead of Params[0].AsInteger := 1. Assigning to the Value property preserves original parameter data type.
Regards, Dmitry
|
|