Hello everyone,
I am facing an issue where when I pass Arabic words into my stored procedure it'll updated the correct record but in the database instead of saving the string I passed in saves "????" I'm assuming tis is because its a unicode string
My first instinct was to use N' but it did not work in outsystems sql query because of the '
thanks!
The solution was to enable the expand inline property for the parameter in AdvanceSQL then passing the input as
"N'"+EncodeSql(MyArabicVariable)+"'"
Hi Rima,
Please refer the below link to get the idea how you can pass the single quote string into the SQL query.
https://www.databasestar.com/sql-escape-single-quote/
Thanks & Kind Regards,
Sachin
I don't think this is the issue because I'm passing a variable and I tried to concatenate the N' with the value before passing it to my sql query but it saved as "N'?????"
Please refer these 2 links where it is mentioned that columns/attributes need to able to store unicode characters. I hope this will make sense and might be other members put some shed on this.
https://www.xspdf.com/resolution/55058141.html
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/419416c5-d1a1-4037-a5f3-0e815fa6277b/questions-mark-instead-of-data?forum=transactsql
Stored procedures are not part of the OutSystems Platform, so this doesn't seem like an OutSystems-related question?
That said, when question marks are saved, the database likely isn't configure for Unicode (unfortunately, the same goes for this forum: ??? (those were the Arabic numerals 1-3).
Hi killian,
the data base already has a bunch of Arabic data that is why I assumed that the issue might be how I'm calling the stored procedure from outsystems or how I am passing the variables
Thanks anyways!
Please tell us how did you call the stored procedure and passed the variables.
Also, Did you tried instead of calling the stored procedure using a simple update query ( pass the same parameter).
and see if you get the same results?
Kind Regards
Hello Tom,
Unfortunately, I cannot use a simple SQL query since I don't have the permission to edit the tables directly.
Here is how I call my Stored procedure in Outsystems.
/* %LogicalDatabase%=GetLogicalDatabase({user}) */ USE [DBname] EXEC [dbo].[sp_update_user] @IdNumber, @FirstName, @LastName, @Gender, @IsActive