Focal Point
Calling stored proc in .FEX

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

September 28, 2004, 03:33 PM
krishkasi
Calling stored proc in .FEX
I am trying to call my stored proc in SQL server in .fex
I am getting following error
"Microsoft OLE DB Provider for SQL Server: [08004] Could not locate entry
: in sysdatabases for database 'KasiTest'. No entry found with that
: name. Make sure that the name is entered correctly"

But the database name and stored proc name are correct.
If anyone can help me with the steps to be followed, it would be great.
September 28, 2004, 03:43 PM
Lloyd
I have yet to use SQL with Focus but from my old SQL server days I do remember that depending on your server settings the DB name can be case sensitive, so I would check that first.
September 28, 2004, 04:02 PM
pruittlr
This is the code I use and it works fine.

ENGINE SQLMSS
EX dbname.owner.tablename parameter, parameter;
TABLE FILE SQLOUT
PRINT *
END

We have several databases on SQL. WebFOCUS has db_datareader permissions only to certain databases. So the access file has to have the dbname also.

Example:
SEGNAME=ES_CATEGORY,
TABLENAME=EMPLOYEESURVEY.dbo.CATEGORY,
CONNECTION=SQLPROD,
KEYS=1
,$

Hope this helps.

Raelene
October 05, 2004, 04:39 PM
krishkasi
Hi,
Can you advise me whether I need to create the Master file the stored proc before using that in my report.

I tried to create the master file but i hope i can create the master file out of only Table and View only right???
October 18, 2004, 08:39 PM
Carol Dobson
you don't need a master file for running a stored procedure, here's another sample of code;
CHANGE yourserver to your server
Change STOREDPROC to the name of your stored procedure

This example passes 2 variables to the stored procedure. Lastly, results get put in a file named SQLOUT, which you can only make one pass at. For this reason, I always create another hold file from the results of SQLOUT.
Good Luck, Carol

SQL SQLMSS SET SERVER yourserver
SET SQLENGINE = SQLMSS
SQL SQLMSS EX STOREDPROC '&STARTDATE','&ENDDATE' ;
TABLE FILE SQLOUT
PRINT STARTDATE ENDDATE
ON TABLE HOLD AS YOURFILE
END
-RUN