Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Delphi-BCB/Database/DBExpress    [ Add a report in this area ]  
Report #:  103569   Status: Reported
TDBXParameterList must have a ParamByName function to easy adapting DBX framework.
Project:  Delphi Build #:  16.0.4358.45540
Version:    16.3 Submitted By:   Tugrul HELVACI
Report Type:  Suggestion / Enhancement Request Date Reported:  2/21/2012 12:45:26 AM
Severity:    Commonly encountered problem Last Updated:
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: None
Description
I think TDBXParameterList must have a ParamByName function to easy adapting DBX framework. Like this;

  TDBXParameterListHelper = class helper for TDBXParameterList
  public
    function ParamByName(const ParamName : String) : TDBXParameter;
  end;

function TDBXParameterListHelper.ParamByName(
  const ParamName: String): TDBXParameter;
begin
  Result := nil;

  try
    Result := Self.GetParameterByName(ParamName); // for Native Driver
  except
    Result := Self.GetParameterByName( StringReplace(ParamName, '@', '', []) ); // for DevArt driver
  end;
end;
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01