Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
EDBStoredProc 'Argument out of range' |
Wed, Dec 11 2013 12:02 AM | Permanent Link |
Peter | Delphi XE3 EDB 2.14 build 5
Hello If I plonk an EDBStoredProc on a form, assign the name of the SP in the IDE, then call the following to open the SP, I get an 'Argument out of range' error. ESPDriver.Close; ESPDriver.Params[0].AsBoolean := False; // ESPDriver.ParamByName('OnlyActive').AsBoolean := False; try ESPDriver.ExecProc; except raise; end; The error happens almost always the first time I call the EDBStoredProc. If I then rem the Params line and pass the ParamByName, it works. If I then rem out the ParamByName line and revert to Params - it works equally well!! It appears that the Params list has zero members, though I am not sure that I can do anything about that. To be fair, I sometimes copy the component from another form, as some of the fields are already populated, but I always re-assign the target SP before I do anything. As with any mysterious error I am concerned that it will return to haunt me later. Any suggestions? Regards Peter |
Wed, Dec 11 2013 5:37 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Peter
Add ESPDriver.Prepare before the first time you try to use the proc. Roy Lambert [Team Elevate] |
Wed, Dec 11 2013 4:01 PM | Permanent Link |
Peter | Doh!
I had inspected the Params property in the IDE and noticed that in every case the correct name and index of each parameter was listed, so assumed that if it could see it in the IDE then it would see it in the app. Silly me. Thanks Roy Regards Peter |
Thu, Dec 12 2013 2:36 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Peter
Its caught me many times. Roy Lambert [Team Elevate] |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |