Solved

StoredProc Parameters.

Posted on 1998-06-01
3
355 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

617 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