Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8616809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:42:30+00:00 2026-06-12T05:42:30+00:00

My question is same as Shaun’s ( link ) But, that question seem to

  • 0

My question is same as Shaun’s (link)

But, that question seem to have no answer.

Is there tools other than TADOStoredProc that possible to be used to pass parameter by name?

I know it’s possible by using Parameters.Refresh. But I dont want to use that because it makes additional round-trip to server.

I also have tried UniDAC, but it also not possible to pass parameter by name.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:42:31+00:00Added an answer on June 12, 2026 at 5:42 am

    If you add the procedure name in design time, you can also check the parameters in design time (you’ll need a connection, I think). That way, you don’t have to put all the SQL in your code, and you don’t have to check for parameters during runtime.
    Just put an ADOStoredProc on the form datamodule for each procedure you’re going to call. You can give them a more sensible name, and you save a lot of code.

    Same goes, of course, for queries and commands.

    Alternatively, you can add the parameters from code yourself. You can specify the parameters, along with their name, type and other properties using YourADOStoredProc.Parameters.Add.

    If you add the ADO controls to one or more datamodule, you can easily call them from the whole application. You can even write methods (and I think you should), to wrap the calls in. That way, you don’t have to mess around with parameters throughout your application, and in that wrapper method, you can configure the parameters:

    procedure TYourDataModule.DeleteCustomer(CustomerId: Integer);
    var
      CustomerIdParam: TParameter;
    begin
      with YourDeleteCustomerADOStoredProc do
      begin
        CustomerIdParam := Parameters.FindParam('P_CUSTOMERID');
    
        if CustomerIdParam = nil then
        begin
          CustomerIdParam := Parameters.AddParameter;
          CustomerIdParam.Name := 'P_CUSTOMERID';
          CustomerIdParam.DataType := ftInteger;
          CustomerIdParam.Direction := pdInput;
          //CustomerIdParam.Size := 40; // May be needed for strings;
        end;
    
        CustomerIdParam.Value := CustomerId;
    
        ExecProc;
    
      end;
    end;
    

    That way, you can just call YourDataModule.DeleteCustomer(20) throughout the application, without having to worry about parameters. But as you can see, it requires a little coding, so you could reconsider using the design time configuration. It’s really easier.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the same question as #1895500 , but with PostgreSQL not MySQL. How
This is the same question for older version of Scala, but they say that
I have the same question for Maven that someone had about Ant ( How
I have same question asked in nServicebus group. I did not get firm answer
I asked this same question about a week ago, but I might not have
Asked the same question here but got no answer, so I'm trying here instead
The same question has been asked in this post , but the accepted answer
This is the same question that has been asked elsewhere on the site but
I have the same question that was asked in another post except I'm having
I've asked the same question some days ago, but there I wanted to solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.