Magic parameter's name "eventyear"

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
radeczki
Posts: 3
Joined: Wed 24 Aug 2016 13:47

Magic parameter's name "eventyear"

Post by radeczki » Wed 24 Aug 2016 13:59

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;

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Magic parameter's name "eventyear"

Post by ViktorV » Thu 25 Aug 2016 12:39

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.

Post Reply