Focal Point
[CLOSED] displaying results from MySQL stored procedure

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2977055716

March 07, 2012, 02:35 PM
CA
[CLOSED] displaying results from MySQL stored procedure
I have a very simple report that I am using to try and test retrieving results from a MySql stored procedure. I have tried numerous variations but they all end the same way with "EDA no data".

Here is the procedure:


ENGINE SQLMYSQL SET DEFAULT_CONNECTION BCAR_Dev
SQL SQLMYSQL
call dev_activity.p_SportCrossTab_AgeRange_DOB('AgeRange','Municipalities','Vancouver - C','2',null,null,null,'2009-2010');
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT
END

I have tested the procedure with the parameters shown above and results are returned.

Any help would be appreciated!

Thanks,

CA

This message has been edited. Last edited by: Kerry,


WebFocus 7.7.02
Windows Server 2008
HTML/PDF/Excel
March 07, 2012, 04:50 PM
Tom Flynn
Welcome to the Forum. Please modify your signature and spell WebFOCUS correctly, THANKS!

2 possible ways:

1)
 
ENGINE SQLMYSQL SET DEFAULT_CONNECTION BCAR_Dev
SQL SQLMYSQL PREPARE SQLOUT FOR
call dev_activity.p_SportCrossTab_AgeRange_DOB('AgeRange','Municipalities','Vancouver - C','2',null,null,null,'2009-2010');
END
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT
END


2)
  
ENGINE SQLMYSQL SET DEFAULT_CONNECTION BCAR_Dev
SQL SQLMYSQL
call dev_activity.p_SportCrossTab_AgeRange_DOB('AgeRange','Municipalities','Vancouver - C','2',null,null,null,'2009-2010');
TABLE
ON TABLE HOLD AS SQLOUT
END
-RUN
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT
END


hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 07, 2012, 05:11 PM
CA
Tom thanks for the help.

I tried both of your examples and get the following error: " (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT".

Everything looks right to me so not sure why that error is coming up. I went looking through my past attempts at getting this to work and realized I made an attempt exactly like your 1st example and abandoned it because of that error.

Not sure what the problem is but would appreciate any more suggestions.

CA


WebFocus 7.7.02
Windows Server 2008
HTML/PDF/Excel
March 07, 2012, 06:13 PM
Doug
Thanks Tom,
quote:
spell WebFOCUS correctly, THANKS!
I see that I'm not the only one who recommends this... Cool
There's only a few other way to capitalize it and they're on a license plate where there are only caps... Don't forget WEBFOC. Who's that Texan from Virginia driving that Awesome Escalade?




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
March 07, 2012, 06:37 PM
Tom Flynn
Did not notice you were holding as SQLOUT, as well, my fault. Try these. I did change call to ex, and took out END in 1):

1)
  
ENGINE SQLMYSQL SET DEFAULT_CONNECTION BCAR_Dev
SQL SQLMYSQL PREPARE SQLOUT FOR
ex dev_activity.p_SportCrossTab_AgeRange_DOB('AgeRange','Municipalities','Vancouver - C','2',null,null,null,'2009-2010');
-* END
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT1
END
-RUN


2)
 
ENGINE SQLMYSQL SET DEFAULT_CONNECTION BCAR_Dev
SQL SQLMYSQL
ex dev_activity.p_SportCrossTab_AgeRange_DOB('AgeRange','Municipalities','Vancouver - C','2',null,null,null,'2009-2010');
TABLE ON TABLE HOLD AS SQLOUT
END
-RUN
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SQLOUT1
END
-RUN


"Maybe" the connection name is incorrect(BCAR_Dev)?
"Maybe" the dbo is incorrect(dev_activity), don't know?

If this doesn't work, please open a case with IBI, as, my search on SQLMYSQL only came up with a few hits...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
March 07, 2012, 07:33 PM
CA
Thanks for the help Tom. I did not notice I was holding as SQLOUT but I should have. Either way I still cannot see the data returned by the procedure using either example.

I have checked the connection name and database name and they are correct. I can cut and paste the sql into a mysql window and it runs correctly.

I did have to change the ex back to call as that is the mysql syntax.

Again thanks for the help and I guess I am off to support.

CA


WebFocus 7.7.02
Windows Server 2008
HTML/PDF/Excel