-2

I am going to bind a dropdown from Sql Server database in ProcessMaker DynaForm. I set up the connection and write the query. My query return data which some of them are in Persian language, so the dropdown failed to bind and Chrome Inspector shows the error:

Unexpected token ;

Whenever I changed my query in which the returned data is not in Perisan language, every thing works fine!

Even when I write a mock query such as: Select 1, N'وحید', whitout referencing any table, every thing works fine too!

How can I confugre processmaker to show the Persian language data in dropdown too?

UPDATE

I found the php class which executes the query and get the returned data. Here is the result which is returned:

Array ( [0] => 1 [1] => ��� ����� ) 
Array ( [0] => 2 [1] => ��� �Ә��� ) 
Array ( [0] => 3 [1] => ��� ������� ) 
Array ( [0] => 4 [1] => ������ ) 
Array ( [0] => 5 [1] => ��� ͘�� )

I think there is some problem with connection encoding, but I do not know how to resolve it!

Here is my connection to sql server's details:

MSSQLStatement Object ( [conn:protected] => MSSQLConnection Object ( [database:MSSQLConnection:private] => MyDB [transactionOpcount:protected] => 0 [dblink:protected] => Resource id #18 [dsn:protected] => Array ( [database] => MyDB [encoding] => utf8 [hostspec] => MyInstanceName [password] => MyPassword [phptype] => mssql [port] => [protocol] => [socket] => [username] => MyUserName ) [flags:protected] => 0 [lastQuery] => select Id, Title From MyTable ) [resultSet:protected] => [updateCount:protected] => [warnings:protected] => Array ( ) [resultClass:protected] => [stmt:protected] => [limit:protected] => 0 [offset:protected] => 0 )
Vahid Farahmandian
  • 6,081
  • 7
  • 42
  • 62

1 Answers1

-2

Are you adding a semicolon at the end of the query?

If you checkout the ProcessMaker documentation, they indicate that when using SQL server, semicolon should not be added:

milton
  • 57
  • 1
  • The problem is not related to the semicolon, because the query executed successfully for non-unicode returned values, but it fails for the unicode returned values! – Vahid Farahmandian Aug 14 '17 at 06:29