?
Solved

Stored Procedure Parameter Problem

Posted on 1997-11-24
1
Medium Priority
?
222 Views
Last Modified: 2010-04-04
I have a stored procudure in SQL Server with 3 parameters:
        pa varchar(10)
        pb varchar(20)
        pc smallInt OUTPUT
and therefore I creaet a stored procedure in Delphi with parameters
        @pa     INPUT
        @pb     INPUT
        @pc     INPUT/OUTPUT
when I try to call it from Delphi, it keeps coming out an error message.
If I bind the parameters by name, it says "Parameter 'pa' not found";
if I bind the parameters by number, it says "Invalid parameter".
What can I do with this? Any advices are appriciated.
0
Comment
Question by:huangsu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
hansmtbank earned 400 total points
ID: 1351663
When you set DatabaseName and StoredProcName properties
in Object Inspector try to set Active=True. If it fails then you
didn't set Params property in this stored procedure. Choice
this property Params and set all TYPES and null values for all
parameters.
It seems to me that Delphi can pass Params without type casting. If Params[0] is Integer I set it's value
 MyProc.Params[0].AsInteger := 1;

and not

MyProc.Params[0].AsString := '1';

Regards!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question