TOraStoredProc error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jim.eckels
Posts: 6
Joined: Tue 28 Jan 2014 23:15

TOraStoredProc error

Post by jim.eckels » Fri 31 Jan 2014 22:19

I have the following stored procedure

Code: Select all

CREATE OR REPLACE PROCEDURE MYPROC
(
    30+ params .. ALL inputs number(10, number(5) and varchar2(1)
)
AS
BEGIN

-- do something with those fields, like perhaps an insert to a table or something

EXCEPTION

	WHEN OTHERS THEN
		NULL;

END MYPROC;
/
And the following code to execute it

Code: Select all

  FQuery := TOraStoredProc.Create(Nil);
  FQuery.Session := FConnection.FConnection;
  FQuery.StoredProcName := FName;
  FQuery.AutoCommit := False;
  FQuery.FetchAll := False;
  FQuery.ParamCheck := True;
  FQuery.Prepare;

  // assign my 30+ params here.  verified that all params are assigned


  FQuery.Execute;
This is the message I am getting ...

Code: Select all

First chance exception at $000007FEFD8F940D. Exception class EConvertError with message 'Cannot convert type'. Process TestProject.exe (7004)
Here is the stack trace from debugger ...

Code: Select all

System._RaiseExcept(???)
OraClasses.TOraParamDesc.SetItemAsVariant(11583061,$996EEF8)
OraClasses.InternalSetValue(2046,$B92330)
OraClasses.TOraParamDesc.SetValue(nil)
DBAccess.TCustomDASQL.AssignParamValue($AC33E9,$12AFF0B0)
Ora.TOraSQL.AssignParamValue($AC33E9,$12EBE180)
DBAccess.TCustomDASQL.WriteParams(False)
DBAccess.TCustomDADataSet.Execute
What am I doing wrong here? Why is TOraParamDesc.SetValue(nil) there? I cannot find that in the documentation anywhere.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraStoredProc error

Post by AlexP » Mon 03 Feb 2014 15:46

Hello,

We cannot reproduce the problem. Please send the full script for creating the procedure, as well as the Delphi code, where you are setting parameter values. In addition, try to analyze the problem: detect the parameter leading to the error.

Post Reply