D2007 & DXE2 / TStoredProcName Params problem

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
jerduval
Posts: 20
Joined: Mon 13 Sep 2010 08:33
Location: Colombes, France

D2007 & DXE2 / TStoredProcName Params problem

Post by jerduval » Fri 06 Jul 2012 15:41

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
Last edited by jerduval on Wed 13 Mar 2013 13:21, edited 2 times in total.

AndreyZ

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by AndreyZ » Mon 09 Jul 2012 11:35

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.

jerduval
Posts: 20
Joined: Mon 13 Sep 2010 08:33
Location: Colombes, France

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by jerduval » Mon 09 Jul 2012 11:42

Hi, thanks for return.

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

Regards,

Jerome DUVAL

AndreyZ

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by AndreyZ » Mon 09 Jul 2012 12:28

We plan to release all dbExpress drivers approximately in a month.

jerduval
Posts: 20
Joined: Mon 13 Sep 2010 08:33
Location: Colombes, France

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by jerduval » Mon 10 Sep 2012 09:56

Hello,
Could you tell when the next release will be available ?
Regards,
Jerome DUVAL
Holy-Dis

AndreyZ

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by AndreyZ » Mon 10 Sep 2012 11:22

We will release all dbExpress drivers in two or three days.

jerduval
Posts: 20
Joined: Mon 13 Sep 2010 08:33
Location: Colombes, France

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by jerduval » Tue 12 Mar 2013 13:55

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

AndreyZ

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by AndreyZ » Wed 13 Mar 2013 10:26

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.

jerduval
Posts: 20
Joined: Mon 13 Sep 2010 08:33
Location: Colombes, France

Re: DBX4 / D2007 / TStoredProcName Params problem

Post by jerduval » Wed 13 Mar 2013 10:48

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

AndreyZ

Re: D2007 & DXE2 / TStoredProcName Params problem

Post by AndreyZ » Thu 14 Mar 2013 08:24

We plan to release all dbExpress drivers approximately in a month.

Post Reply