Discussion:
list index out of bounds(0) in SQLStoredProcs
(too old to reply)
delfo
2008-02-18 12:48:29 UTC
Permalink
I'm trying to update a program that uses Oracle10 from D7 to D2007
(version 11.0.2902). The only change that I've done is to change
LibraryName in Sqlconnection to dbxora30.dll and rebuilt the program.

Querys work like usual, but every stored proc I've tried gives List
index out of bounds(0) error. Don't know if it's relevant, but we have a
scheme in which all stored procedures and packages have public synonyms,
so we didn't need to specify the owner.

I've even tried to delete a storec proc, create a new one and set
properties. D2007 was able to retrieve the parameters but still gives
the same error executing it, even setting GetMetadata to false.

How can I solve it?
TIA
delfo
2008-02-19 10:33:23 UTC
Permalink
In case it helps, this is the call stack:

:7c81eb33 kernel32.RaiseException + 0x52
:00421eca TList.Get + $1E
:00421eca TList.Get + $1E
:005ee11f TCustomSQLDataSet.ExecuteStatement + $5F
:005edf42 TCustomSQLDataSet.ExecSQL + $5A
:005f180e TSQLStoredProc.ExecProc + $A
:004a0ec8 TCustomConnection.SetConnected + $54
myform.BBOKClick(???)
:00466f36 TControl.Click + $6A
:0046aa28 TWinControl.WndProc + $500
:004477a1 TButtonControl.WndProc + $71
delfo
2008-02-19 13:42:36 UTC
Permalink
This goes from bad to worse. I've created a test program from zero with
a all new named connection, and if I copy a SqlstoredProc from my old
program that calls Mypackage.Myproc I still get the same error. If I
fill SchemaName then it works. With Delphi7 it worked leaving it blank
or using PUBLIC.MyProc for standalone procedures. It would be a lot of
work having to fill hundreds of storedprocs properties throughout the
application.

But much worse, if I want to call MyPackage.MyFunc it always fails with
everything I've tried. It seems DBX is confusing functions with
procedures. This is the call stack:



:7c81eb33 kernel32.RaiseException + 0x52
DBXCommon.TDBXContext.Error(???,'ORA-06550: línea 1, columna
7:'#$A'PLS-00221: 'MYFUNCNAME' no es un procedimiento o no se ha
definido'#$A'ORA-06550: línea 1, columna 7:'#$A'PL/SQL: Statement ignored')
DBXDynalink.TDBXMethodTable.RaiseError($B893D0,-1,???,'')
DBXDynalink.TDBXDynalinkCommand.CheckResult(???)
DBXDynalink.TDBXDynalinkCommand.DerivedExecuteQuery
DBXCommon.TDBXCommand.ExecuteQuery
DBXDelegate.TDBXMorphicCommand.ExecuteQuery
:0050843e TDBXMorphicCommand.ExecuteQuery + $12
:0053015e TCustomSQLDataSet.ExecSQL + $5A
:00533a2a TSQLStoredProc.ExecProc + $A
:0044e31a TControl.Click + $6A
:00451e0c TWinControl.WndProc + $500
:0043a4fd TButtonControl.WndProc + $71
:00451f5c DoControlMsg + $28
:00451e0c TWinControl.WndProc + $500
:0046316c TCustomForm.WndProc + $558
:00451533 TWinControl.MainWndProc + $2F
:004275be StdWndProc + $16
:77d18709 USER32.GetDC + 0x72
:77d187eb ; C:\WINDOWS\system32\USER32.dll
:77d1b743 ; C:\WINDOWS\system32\USER32.dll
:77d1b7ab USER32.SendMessageW + 0x49
:773c6ff6 ;
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
:773c70d8 ;
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
:773c93dd ;
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
:77d18709 USER32.GetDC + 0x72
:77d187eb ; C:\WINDOWS\system32\USER32.dll
:77d1c00e USER32.DestroyCaret + 0x5e
:77d1e366 USER32.CallWindowProcA + 0x1b
:00451f08 TWinControl.DefaultHandler + $DC
:00451e0c TWinControl.WndProc + $500
:0043a4fd TButtonControl.WndProc + $71
:004275be StdWndProc + $16
:77d18709 USER32.GetDC + 0x72
:77d187eb ; C:\WINDOWS\system32\USER32.dll
:77d189a5 ; C:\WINDOWS\system32\USER32.dll
:77d1bccc USER32.DispatchMessageA + 0xf
:0046aee9 TApplication.ProcessMessage + $101

Loading...