Solved

StoredProc Parameters.

Posted on 1998-06-01
3
353 Views
Last Modified: 2010-04-06
I've got a stored Procedure in Sybase that takes has in input parameter of a date and four output parameters.  I Set the input parameter, Prepare the StoredProc Component. then Open it.  Howver I get an ODBC error.. Wrong number of parameters... Blah blah..

Any ideas?

Roger Webb
0
Comment
Question by:Whytboy
[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
  • 2
3 Comments
 

Accepted Solution

by:
KirkGray earned 100 total points
ID: 1349584
Sometimes Deplhi doesn't like runtime parameter binding in queries (for example when you refer to a SP in sql server using a database prefix.... ie 'master..xp_regread').

I solved the problem by building the query myself.  Ie... Do Your Own parameter Subsitution at Runtime.  I know it's a little slower ('cause of no prepare and stuff)... but if it works, it works!


0
 

Author Comment

by:Whytboy
ID: 1349585
Problem is... then you are stuck with the query right there.. can't use it in other programs anywhere without rebuilding.. then if you need to change it... you gotta remember everywhere the query is used.

Roger
0
 

Expert Comment

by:KirkGray
ID: 1349586
I don't think you got what I mean.

My Idea was still to use your stored procedure, but not Delphi parameter subsutition.

Like put this SQL in a TQuery:

SP_MyProc 'a text parameter'

as opposed to using a TStoredProc component.  

Just an idea, I thought might have helped, But I think you would have trouble with output parameters using this technique anyhow.

Cheers Man,

  Kirk.
0

Featured Post

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Correct Component for Shopping Cart. 2 132
Need Help Delphi 2010 CheckBox1 Stored value in memo 13 98
Tvertscrollbox like a whatsapp layout 5 65
IP without any Dots 1 95
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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