Difference between revisions of "Unicode Support- MS SQL"
From Hostek.com Wiki
(Created page with "==Enabling Unicode Characters For a Table== *If you're having issues getting unicode characters to insert into your MS SQL database there are a couple of things you can do to ...") |
|||
Line 19: | Line 19: | ||
*Some datatypes such as '''"varchar"''' are not able to contain unicode characters so you'll want to change the datatype to '''"nvarchar"''' | *Some datatypes such as '''"varchar"''' are not able to contain unicode characters so you'll want to change the datatype to '''"nvarchar"''' | ||
*You can change the datatype for a database column using '''"MyLittleAdmin"''' in the WCP or by using '''"SQL Management Studio"''' | *You can change the datatype for a database column using '''"MyLittleAdmin"''' in the WCP or by using '''"SQL Management Studio"''' | ||
+ | |||
+ | [[Category:Databases-MSSQL]] |
Latest revision as of 10:21, 3 September 2012
Enabling Unicode Characters For a Table
- If you're having issues getting unicode characters to insert into your MS SQL database there are a couple of things you can do to get it working:
Default Collation
- First you can set the collation for your MS SQL database to the language set you're needing to insert characters for.
- Click on "MS SQL" in the WCP
- Click the edit button next to your MS SQL database
- Select the default collation you want to use from the drop-down menu and click "Save"
- For example if you're needing to insert Russian characters you would use "Cyrillic_General_BIN"
- You can also use an SQL statement to change the collation for a particular column:
ALTER TABLE table-name ALTER COLUMN testcolumn varchar(10) COLLATE Cyrillic_General_BIN
- You'll need to replace the "table-name" and "testcolumn" values with the actual table name and column name you want to change
Change Datatype
- Some datatypes such as "varchar" are not able to contain unicode characters so you'll want to change the datatype to "nvarchar"
- You can change the datatype for a database column using "MyLittleAdmin" in the WCP or by using "SQL Management Studio"