10
Views
7
Comments
stored procedure update saves Arabic characters as question marks
Application Type
Reactive

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!

Rank: #299

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

Rank: #52940

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'?????"

Rank: #299

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

Thanks & Kind Regards,

Sachin

mvp_badge
MVP
Rank: #2

Hi Rima,

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).

Rank: #52940

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! 

Rank: #287

Hi Rima,

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

Rank: #52940

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