Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By naomikimani
#824083
Hi,

I am working on a trigger to auto-generate a PONumber by linking it to the RFQ number on Processmaker 3.3. However, it keeps sending the error on not connecting to sql server. Below is the trigger I am using:

$RFQNumber = @@RFQNo;

$dbhandle = mysqli_connect('localhost','wf_workflow' , 'f0p54t3bscgh','wf_workflow',"3306") or die("Couldn't connect to SQL Server");

$query = "CALL proc_generateponum('$RFQNumber')";
$result = mysqli_query($dbhandle,$query) or die(mysqli_error());
@@PONumber=$result->fetch_object()->ponum;
@@PONumber = 'T4G-PO-'[email protected]@PONumber;
$result->free();
User avatar
By amosbatto
#824105
Fredrick wrote: Wed Apr 24, 2019 2:48 am I get the same error - Running ProcessMaker 3.3.1 on Linux, Ubuntu 18.04 and MySQL Version 5.6.4 - available DB engine MySql, mssql extension.
Are you trying to connect to Microsoft SQL Server?
Are you able to create a Database Connection in ProcessMaker which connects to MSSQL ?

If not, then see if your network has a firewall that is blocking traffic and check whether the port being used by MSSQL on the other machine is open. Also try pinging from your processmaker server to your MSSQL server.

hi His main problem is that he wants to make a pr[…]

Yes, there is a limit to executeQuery() function. […]

I found the solution, I must use case_Open like […]

Hi dan123dan, Thank you for the reply and providi[…]