Page 1 of 1

D2007 & DXE2 / TStoredProcName Params problem

Posted: Fri 06 Jul 2012 15:41
by jerduval
Hi,

We actually migrate our project from Delphi 6 to Delphi 2007.
There is a problem with the TStoredProcName when accessing the params.
We use the DbExpress driver for MS SQL 5.0.3.

Here is an exemple with the MS SQL stored procedure "sp_helpsrvrolemember"
(http://msdn.microsoft.com/fr-fr/library/ms188772.aspx) :

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  SQLConnection1.DriverName := 'DevartSQLServer';
  SQLConnection1.LibraryName := 'dbexpsda40.dll';
  SQLConnection1.VendorLib   := 'sqloledb.dll';
  SQLConnection1.GetDriverFunc := 'getSQLDriverSQLServer';
  SQLConnection1.Params.Clear;
  SQLConnection1.Params.Values[{!4}'HostName']   := 'vm-dev-sql2k5';
  SQLConnection1.Params.Values[{!4}'DataBase'] := 'PLW3LHD2';
  SQLConnection1.Params.Values[{!4}'User_Name'] := 'sa';
  SQLConnection1.Params.Values[{!4}'Password']  := '****';
  SQLConnection1.Params.Values[{!4}'CommandTimeOut'] := '0';
  SQLConnection1.LoginPrompt := false;
  SQLConnection1.Open;
  try
    SQLStoredProc1.SQLConnection := SQLConnection1;
    SQLStoredProc1.StoredProcName := 'sp_helpsrvrolemember';
    Label1.Caption := IntToStr(SQLStoredProc1.Params.Count); 
    // => 0 in D2007, 2 in D6 
    SQLStoredProc1.Params.ParamByName('srvrolename').AsString := {!4}'sysadmin'; 
    // => Exception in D2007
  finally
    SQLConnection1.Close;
  end;
end;
This code work fine with Delphi 6 and the dbexpsda.dll.
With Delphi 2007 we get a EDatabaseError with message 'SQLStoredProc1: Parameter 'srvrolename' not found'.

It seems that the problem only appears for built-in MS SQL stored proc.
We don't have this problem with our own stored proc.

What's wrong ?

Jerome DUVAL
Holy-Dis

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Mon 09 Jul 2012 11:35
by AndreyZ
Hello,

Thank you for the information. We have reproduced and fixed this problem. This fix will be included in the next dbExpress driver for SQL Server build.

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Mon 09 Jul 2012 11:42
by jerduval
Hi, thanks for return.

Can you tell me when the next build will be available ?

Regards,

Jerome DUVAL

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Mon 09 Jul 2012 12:28
by AndreyZ
We plan to release all dbExpress drivers approximately in a month.

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Mon 10 Sep 2012 09:56
by jerduval
Hello,
Could you tell when the next release will be available ?
Regards,
Jerome DUVAL
Holy-Dis

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Mon 10 Sep 2012 11:22
by AndreyZ
We will release all dbExpress drivers in two or three days.

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Tue 12 Mar 2013 13:55
by jerduval
Hi AndreyZ

We have the same problem with the 6.1.2 driver and Delphi XE2.
Can you tell me what's going wrong ?

Regards,

Jerome DUVAL
Holy-Dis

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Wed 13 Mar 2013 10:26
by AndreyZ
Thank you for the information. I have reproduced the problem. We will fix this problem in the next build of dbExpress driver for SQL Server.

Re: DBX4 / D2007 / TStoredProcName Params problem

Posted: Wed 13 Mar 2013 10:48
by jerduval
Dear AndreyZ,

Can you tell me when the next build will be available ?

We currently use 3 products from Devart (dbExpress Fb / DbExpress SQLServer / ODAC), and we are frequently bloqued in our work due to bugs in Devart drivers (you can take a look to my posts to see what I mean).

Regards,

Jerome DUVAL
Holy-Dis

Re: D2007 & DXE2 / TStoredProcName Params problem

Posted: Thu 14 Mar 2013 08:24
by AndreyZ
We plan to release all dbExpress drivers approximately in a month.