Arabic appears in question marks when move data from Visual Studio project to SQL Server database

63 Views Asked by At

I have a problem with my Visual Studio/SQL Server project.

When I input data in VS project to be stored in the SQL Server database, the data I entered in Arabic appears as question marks in database.

This is my stored procedure:

ALTER PROCEDURE [dbo].[ADD_PRODUCT]
    @ID_CAT int,
    @ID_PRODUCT varchar(30),
    @Label varchar(30),
    @Qte int,
    @Price varchar(50),
    @Img Image
AS
    INSERT INTO [PRODUCTS] ([ID_PROD], [LABEL_PROD], [QTE_IN_STOCK],
                            [PRICE_PROD], [IMG_PROD], [ID_CAT])
    VALUES (@ID_PRODUCT, @Label, @Qte, 
            @Price, @Img, @ID_CAT)

The part in question is @Label.

This is the code in Visual Studio:

prd.ADD_PRODUCT(Convert.ToInt32(cmbCat.SelectedValue), txtDes.Text, txtRef.Text, Convert.ToInt32(txtQnt.Text), txtPrx.Text, ByteImage);

The corresponding parameter is txtDes.Text.

I tried the collation method in SSMS but it doesn't seem to work when the data enters from another program (ie. Visual Studio).

I changed the data type from varchar to nvarchar, but with no avail.

0

There are 0 best solutions below