April 19, 2013 at 5:29 am
I am going to design a application having front end with VB6.0 and Back end with SQL SERVER in. And I want the complete interface of that application in marathi language.
when I enter the marathi character in data base and execute it, it shows "????????" like this.
What I do to enter and store the marathi character in Database?
April 19, 2013 at 5:39 am
your table needs to use nvarchar and not varchar fields to hold unicode data.
in addition, any parameters you are using also need to be nvarchar...so in .NET language, for example if you declared a SQL Parameter that was not nvarchar, the parameter would convert your data to question marks, and then store it in a field that ahd the ability to store it correct.
Dim pAgencyAlias As New SqlParameter("@AgencyAlias", SqlDbType.VarChar, 30)
--should be
Dim pAgencyAlias As New SqlParameter("@AgencyAlias", SqlDbType.NVarChar, 30)
example of accidental implicit conversion:
/*--Results
(No column name)(No column name)
??/?? ??/??
(No column name)(No column name)
??/?? ??/??
*/
declare @var varchar(10),
@nvar nvarchar(10)
SELECT @var = ' ??/??' ,@nvar = ' ??/??'
SELECT @var,@nvar
SELECT @var = N' ??/??' ,@nvar = N' ??/??'
SELECT @var,@nvar
Lowell
April 19, 2013 at 5:48 am
its not working
April 19, 2013 at 5:51 am
gamit124 (4/19/2013)
its not working
Remember we are not sitting behind you, looking over your shoulder.
i have no idea what is working or not working.
If you want help with that, you'd need to post the TSQL code you are using so we can paste it in our own SSMS and offer improvements.
the code i pasted certainly works and demonstrates that the field must be nvarchar AND the assignment must follow the N'value' format in order to preserve the values.
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply