473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

how to display the out parameter value

kaleeswaran
132 100+
hi!
i am new to myql procedure..
i can get the output value from the procdure if i use select option..but i could't get the value while i am using the out parameter.it shows null..
when i try to print the variable..
what is the pbm?..............
give me the solution...
thank you,
kalees
Nov 5 '07 #1
6 4522
amitpatel66
2,367 Expert 2GB
hi!
i am new to myql procedure..
i can get the output value from the procdure if i use select option..but i could't get the value while i am using the out parameter.it shows null..
when i try to print the variable..
what is the pbm?..............
give me the solution...
thank you,
kalees
Kindly post the code that you have tried for my reference?
Nov 5 '07 #2
kaleeswaran
132 100+
thank you for ur replay,
this is my code:
Expand|Select|Wrap|Line Numbers
  1. DELIMITER $$
  2. DROP PROCEDURE IF EXISTS `bankpcb`.`sample_pro` $$
  3. CREATE DEFINER=`pinakapcb`@`%` PROCEDURE `sample_pro`(id int,OUT type varchar(45))
  4. BEGIN
  5.   select c_loan_type into type from t_lo_sanction where n_account_no=id;
  6. END $$
  7. DELIMITER ;
  8.  
then i call the procedure like:
CALL sample_pro(2,@a);
then
i tried to select value @a:
select @a;
it shows null........
Nov 5 '07 #3
amitpatel66
2,367 Expert 2GB
thank you for ur replay,
this is my code:
DELIMITER $$
DROP PROCEDURE IF EXISTS `bankpcb`.`sample_pro` $$
CREATE DEFINER=`pinakapcb`@`%` PROCEDURE `sample_pro`(id int,OUT type varchar(45))
BEGIN
select c_loan_type into type from t_lo_sanction where n_account_no=id;
END $$
DELIMITER ;

then i call the procedure like:
CALL sample_pro(2,@a);
then
i tried to select value @a:
select @a;
it shows null........
Is your table having data for account_id = 2?
Nov 5 '07 #4
kaleeswaran
132 100+
yes i am having the value in this id...
Nov 5 '07 #5
amitpatel66
2,367 Expert 2GB
thank you for ur replay,
this is my code:
DELIMITER $$
DROP PROCEDURE IF EXISTS `bankpcb`.`sample_pro` $$
CREATE DEFINER=`pinakapcb`@`%` PROCEDURE `sample_pro`(id int,OUT type varchar(45))
BEGIN
select c_loan_type into type from t_lo_sanction where n_account_no=id;
END $$
DELIMITER ;

then i call the procedure like:
CALL sample_pro(2,@a);
then
i tried to select value @a:
select @a;
it shows null........
You are using DEFINER=`pinakapcb`@` in your procedure,
Are you calling a procedure from the same schema pinakapcb?
If you are calling a procedure from another schema, then the procedure will be called as definer's right and it will use the table t_lo_sanction available in the schema pinakapcb and not from the schema from where you are calling a procedure.
Nov 5 '07 #6
amitpatel66
2,367 Expert 2GB
yes i am having the value in this id...
Use PRINT command to print the value of the variable @a and let me know if it prints the value

Eg:

PRINT @a;
Nov 6 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
23
by: news.hku.hk | last post by:
suppose i have: int price1 = 35000; int price2 = 600; int price3 = 8765; int price4 = 120000; int price5 = 3800000; and i want to output to screen the following:
2
by: MJ | last post by:
Hi, I'm hoping this is relatively easy. I have a report based on a query - when you run the report, a form opens up and you are prompted for a date range. These are combo boxes (ie. January...
1
by: MJ | last post by:
I'm not following... where do I put that? I put a textbox on my report and put the following property for it: =!!.Value This displays 1 (for January 2003). How do I get it to display...
0
by: Derek | last post by:
I have an ASP.Net application that references multiple projects. If an exception occurs in the startup project I can see what line the error occurs on and the source code, if the error occurs in...
2
by: Jake Barnes | last post by:
Imagine I've this block of HTML: <p>Alex Schein Mailing List <input type="checkbox" name="newslettersToUse" value="133156"> (<a href="mcControlPanel.php"...
4
by: Regnab | last post by:
I've got a form - "frmLookup" (with a subform) that works very happily on its own. The form has a list box, which when updated requeries the subform to display the appropriate results. The...
36
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset...
0
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have an RDL which displays data from a SQL dataset. That dataset requires a parameter value named "@CountryID". Is it possible to display the value of @CountryID on the report, once the...
3
by: koutoo | last post by:
Is it possible to display messages in the python shell? I want to display error messages based on parameters in my scripts to the users. Is there another way to display messages other than log...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.