Good evening,
I'm a beginner to JSL. I think suspect that I have a syntax error or something.
I'm trying to run an SQL stored procedure from a JSL script. My database connections seem to work correctly (see when the query is a select statement). However, I can't get the stored procedure to run and give me the data table. Below I've listed:
1) the query formula that works (the select statement) and
2) the three query formulas that won't run my stored procedure.
Thank you for taking a look. --Birdi (JMP 17.0.0)
// HELP: The select statement works but the stored procedure doesn't.
//Does anyone have an idea as to what I'm missing?
// I can run the select statement, but I could use some help on running the stored procedure.
//query="SELECT * FROM [dbo].[tblCost_Outliers]"; // works
query = "exec dbo.procCost_PM_Birdi"; // doesn't work
//query="begin dbo.procCost_PM_Birdi; end;"; // doesn't work
//query = "dbo.procCost_PM_Birdi"; // doesn't work
//create connection
dbc = Create Database Connection(
"DSN=*****;UID=*****;PWD=*****;APP=JMP;WSID=*****;DATABASE=*****;"
);
//get result
Execute SQL( dbc, query );
//tidyup
Close Database Connection( dbc );
What does that mean to use <JSL> to insert JSL code? Yep, I'm new. Thank you for your patience.