Page 1 of 1

Magic parameter's name "eventyear"

Posted: Wed 24 Aug 2016 13:59
by radeczki
I use UniDAC 6.3.13 with RAD Studio XE7 and MSSQL 2005 database.

There is a stored procedure:

Code: Select all

CREATE PROCEDURE dbo.SPC_TES01
(
  @id INT,
  @id2 INT,
  @eventyear INT = NULL
)
AS
BEGIN
  SET NOCOUNT ON

  IF @eventyear <= 0
  BEGIN
    SET @eventyear = NULL
  END

  SELECT @id AS id,
         @id2 AS id2,
         @eventyear AS eventyear,
         'alma' AS name
END;
Then the "@eventyear" parameter "name" is case sensitive, but other parameters are not, why?

Delphi test code:

Code: Select all

begin
  if unstrdprc1.Params.FindParam('ID')<>nil then
    unstrdprc1.ParamByName('ID').AsInteger:=1;
  if unstrdprc1.Params.FindParam('Id2')<>nil then
    unstrdprc1.ParamByName('iD2').AsInteger:=2;
  if unstrdprc1.Params.FindParam('eventyear')<>nil then
    unstrdprc1.ParamByName('eventyear').AsInteger:=4;
  if unstrdprc1.Params.FindParam('EventYear')<>nil then
    unstrdprc1.ParamByName('EventYear').AsInteger:=3;

  unstrdprc1.Open;
end;

Re: Magic parameter's name "eventyear"

Posted: Thu 25 Aug 2016 12:39
by ViktorV
Unfortunately, we could not reproduce the problem with the latest UniDAC version 6.3.13 for RAD Studio XE7. When executing the code you specified, the eventyear parameter value was 3, which means case-insensitivity of parameter name. To investigate this behavior of UniDAC, please, compose a small sample demonstrating the described behavior and send it to viktorv*devart*com.