Insert Abaric Text to Database

I have a requirement to insert Arabic text along with English text into a database table using UiPath.

The insert query executes successfully, but Arabic characters are not being stored correctly (they appear as ??? or are missing).

Currently, the database column is defined as VARCHAR(MAX), and the insert is performed using an SQL query from UiPath.

This is not a UiPath limitation. UiPath strings are Unicode by default and fully support Arabic and other non-English languages. The issue is caused by the database schema and SQL syntax.VARCHAR(MAX) does not support Unicode characters. To store Arabic text, the column must be defined as a Unicode data type like NVARCHAR(MAX) and execute

Use parameters in the Execute Non Query activity:

SQL: INSERT INTO YourTable (YourColumn) VALUES (@Text)

Parameter type: NVARCHAR
Value: variable containing Arabic + English text

If you dont wanted to change the data type use prefix string literals with N

eg: INSERT INTO YourTable (YourColumn)
VALUES (N’English text - نص عربي’);

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.