Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Database
DBExpress
TFMTBcd
TSimpleDataset
TSQLClientDataSet
TSQLConnection
TSQLDataSet
TSQLMonitor
TSQLQuery
TSQLStoredProc
TSQLTable
TSqlTimeStamp
Unicode Support
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Database/DBExpress/TSQLStoredProc
[ Add a report in this area ]
Report #:
6255
Status:
Withdrawn
TSQLStoredProc fails to load procedure parameters at run-time
Project:
Delphi
Build #:
4.453
Version:
7.0
Submitted By:
Philip R. Antokal
Report Type:
Basic functionality failure
Date Reported:
10/21/2003 10:25:10 AM
Severity:
Critical / Show Stopper
Last Updated:
10/21/2003 4:07:24 PM
Platform:
All versions
Internal Tracking #:
Resolution:
None
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
(3 Total Ratings)
5.00 out of 5
Total Votes:
5
Description
I am using Delphi 7 on Windows 2000, connecting to DB2 v7.2 running on a Linux backend.
When I try to activate any TSQLStoredProc that requires parameters I receive an EListError 'List Index out of bounds (0)'. regardless of how many parameters there are (as long as there's at least one), or whether they are input and/or output.
I did a search on the newsgroups and found an incredibly similar error posted by another user.
REFERENCE: borland.public.delphi.database.dbexpress; TOPIC: TSQLStoredProc - EListError 'List Index out of bounds (0)' POSTED BY "Cam" ON 2003-05-07
Once this error occurs, it halts any and all execution of other stored procedures until the program is reset.
While I have not been able to trace directly into the problem as has "Cam," we are getting the same error.
"Cam" suggests the following in the referenced post:
---------------------------------------------------------
I [Cam] have traced into the dbExpress source and found the following problem: The following procedure call I [Cam] believe is supposed to populate the Params from their persistent state set in the environment.
FILE: SqlExpr.pas in Delphi7\source\vcl
LINE:4011.. SetProcedureParams(Self.FSQLConnection, FSQLCommand, Params, ProcParams)
This calls SetProcedureParams obviously which contains as follows
FILE: SqlExpr.pas in Delphi7\source\vcl
LINE:1053.. ArgDesc := PSPParamDesc(ProcParams.Items[I]))^
The ProcParams list is empty!!!! Thus producing an invalid index
error.
---------------------------------------------------------
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments
Riccardo P. Foschia at 11/20/2003 6:18:00 AM
-
I have the same problem with Delphi 7 and Interbase 6, but only if I add the
parameters at run time (see code below). If i put the TSQLStoredProc on a
data module or form at design time, everything works.
Sample Code: Exception "List index..." is raised when executing execProc statement.
oStoredProc := TSQLStoredProc.Create(NIL);
try
with oStoredProc{SQLStoredProc} do begin
SQLConnection := SQLConnection1;
StoredProcName := 'fill_akunh';
SchemaName := 'tradeuser'; // tradeuser is an IB login
Params.createParam(ftSmallInt,'p_mand_nr',ptInput);
Params.createParam(ftSmallInt,'p_ben_nr',ptInput);
Params.createParam(ftInteger,'p_kun_nr',ptInput);
ParamByName('p_mand_nr').AsInteger := 1;
ParamByName('p_kun_nr').AsInteger := 27;
ParamByName('p_ben_nr').AsInteger := 5;
execProc;
end; // with
finally
oStoredProc.free();
end;
For me, it's very important to create TSQLStoredProc objects at run time
because I'm writing an "generic" application using the abstract factory
pattern to create my DB access components.
Petar Uzunov at 2/15/2004 1:57:43 PM
-
Hello,
I have the same problem with Interbase. Is there any chance to resolve it or I must wait for a dbExpress update ?
Svilen Stefanov
Bruno Marotta at 3/22/2006 2:43:33 AM
-
Why was this report Withdrawn?!
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us