dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Relational Databases
Expertise: Beginner
Apr 10, 1998

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Using Output parameter with TQuery

Question:
In a TQuery component, I use the SQL property to call up a stored procedure which is kept on a MSSQL server. The string used is 'Execute [nameofproc] :param1, :param2, etc.

However I am trying to return a value from the stored proc using an 'OUTPUT' parameter. How can I read this value from Delphi? The SQL help suggests using a 'param = retvar output' syntax, but Delphi is not happy when I add this into the execute statement.

Answer:
For most SQL operations, you can get away with using a TQuery; that is, if they're strictly one-way. For other SQL operations, you need to use the TStoredProc. TStoredProc has facilities built in for singleton return values.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date