arabic text insert problem in asp.net
i have a problem with inserting arabic texts in SQL Server or DB2 or Oracle
everytime i insert arabic text , it changes autmatically to ??????? ,
Solution
Datatype should be nvarchar
And your INsert & Update Query should be like this
INSERT INTO TABLENAME(FirstName,LastName) VALUES (N'Gowri',N'Shankar')
connectionString="Provider=DB2OLEDB;User ID=xxxxxx;Initial Catalog=APPLDB;Network Transport Library=TCPIP;Host CCSID=28596;PC Code Page=28596;Network Address=xxx.xxx.xx.xx;Network Port=50000;Package Collection=DB2COLLECTION;Default Schema=jdbc;Connect Timeout=15;Units of Work=RUW;DBMS Platform=DB2/MVS;Defer Prepare=False;Rowset Cache Size=0;Max Pool Size=100;Persist Security Info=False;Connection Pooling=True;Derive Parameters=False;Password=xxxxxxxxx"
web config file
<system.web>
<globalization requestEncoding="ISO-8859-6" responseEncoding="ISO-8859-6" />
i have a problem with inserting arabic texts in SQL Server or DB2 or Oracle
everytime i insert arabic text , it changes autmatically to ??????? ,
Solution
SQL Server:
Datatype should be nvarchar
And your INsert & Update Query should be like this
INSERT INTO TABLENAME(FirstName,LastName) VALUES (N'Gowri',N'Shankar')
DB2 & ORACLE:
connectionString="Provider=DB2OLEDB;User ID=xxxxxx;Initial Catalog=APPLDB;Network Transport Library=TCPIP;Host CCSID=28596;PC Code Page=28596;Network Address=xxx.xxx.xx.xx;Network Port=50000;Package Collection=DB2COLLECTION;Default Schema=jdbc;Connect Timeout=15;Units of Work=RUW;DBMS Platform=DB2/MVS;Defer Prepare=False;Rowset Cache Size=0;Max Pool Size=100;Persist Security Info=False;Connection Pooling=True;Derive Parameters=False;Password=xxxxxxxxx"
web config file
<system.web>
<globalization requestEncoding="ISO-8859-6" responseEncoding="ISO-8859-6" />
No comments:
Post a Comment