Hello,
I am trying to execute a procedure with two parameters on "Add page" event. I have tried with the following code on "Custom Add" event but unsuccessful. Any help would be greatly appreciated.
CustomQuery("EXEC buildPayPeriod '" .$values["CurrentYear"]. "' , '" .$values["PayPeriod"]. "' ");
return false;
I can run the procedure successfully on the SQL Management Studio(e.g. exec buildPayPeriod 2021, 'Bi-Weekly'
. The procedure populate a table based on the parameters. I am getting the following error message:
Call stack
File: line Function Arguments
#0. connections\Connection.php:626 trigger_error 1. Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near '2020'.;
2. 256;
#1. connections\Connection.php:626 Connection->triggerError 1. Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near '2020'.;
#2. connections\MSSQLWinConnection.php:135 MSSQLWinConnection->query 1. EXEC buildPayPeriod('2020' '') ;
#3. include\dal.php:24 CustomQuery 1. EXEC buildPayPeriod('2020' '') ;
#4. include\payperiodbuild_vw_events.php:44 eventclass_payperiodbuild_vw->CustomAdd 1. Array ([CurrentYear] => 2020[PayPeriod] => ) ;
2. Array ( ) ;
3. ;
4. ;
5. AddPage;
#5. classes\addpage.php:593 AddPage->callCustomAddEvent N/A
#6. classes\addpage.php:391 AddPage->processDataInput N/A
#7. classes\addpage.php:318 AddPage->process N/A
#8. payperiodbuild_vw_add.php:86 Global scope N/A
Thank you,
Abhi
I am trying to execute a procedure with two parameters on "Add page" event. I have tried with the following code on "Custom Add" event but unsuccessful. Any help would be greatly appreciated.
CustomQuery("EXEC buildPayPeriod '" .$values["CurrentYear"]. "' , '" .$values["PayPeriod"]. "' ");
return false;
I can run the procedure successfully on the SQL Management Studio(e.g. exec buildPayPeriod 2021, 'Bi-Weekly'

Call stack
File: line Function Arguments
#0. connections\Connection.php:626 trigger_error 1. Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near '2020'.;
2. 256;
#1. connections\Connection.php:626 Connection->triggerError 1. Source: Microsoft OLE DB Provider for SQL Server
Description: Incorrect syntax near '2020'.;
#2. connections\MSSQLWinConnection.php:135 MSSQLWinConnection->query 1. EXEC buildPayPeriod('2020' '') ;
#3. include\dal.php:24 CustomQuery 1. EXEC buildPayPeriod('2020' '') ;
#4. include\payperiodbuild_vw_events.php:44 eventclass_payperiodbuild_vw->CustomAdd 1. Array ([CurrentYear] => 2020[PayPeriod] => ) ;
2. Array ( ) ;
3. ;
4. ;
5. AddPage;
#5. classes\addpage.php:593 AddPage->callCustomAddEvent N/A
#6. classes\addpage.php:391 AddPage->processDataInput N/A
#7. classes\addpage.php:318 AddPage->process N/A
#8. payperiodbuild_vw_add.php:86 Global scope N/A
Thank you,
Abhi