<bdo id='mXfNk'></bdo><ul id='mXfNk'></ul>

    <small id='mXfNk'></small><noframes id='mXfNk'>

      <i id='mXfNk'><tr id='mXfNk'><dt id='mXfNk'><q id='mXfNk'><span id='mXfNk'><b id='mXfNk'><form id='mXfNk'><ins id='mXfNk'></ins><ul id='mXfNk'></ul><sub id='mXfNk'></sub></form><legend id='mXfNk'></legend><bdo id='mXfNk'><pre id='mXfNk'><center id='mXfNk'></center></pre></bdo></b><th id='mXfNk'></th></span></q></dt></tr></i><div id='mXfNk'><tfoot id='mXfNk'></tfoot><dl id='mXfNk'><fieldset id='mXfNk'></fieldset></dl></div>
      <legend id='mXfNk'><style id='mXfNk'><dir id='mXfNk'><q id='mXfNk'></q></dir></style></legend>
    1. <tfoot id='mXfNk'></tfoot>

      如何将阿拉伯字符插入到 SQL 数据库中?

      时间:2023-08-21

      <small id='Vnhim'></small><noframes id='Vnhim'>

      <legend id='Vnhim'><style id='Vnhim'><dir id='Vnhim'><q id='Vnhim'></q></dir></style></legend>

      • <i id='Vnhim'><tr id='Vnhim'><dt id='Vnhim'><q id='Vnhim'><span id='Vnhim'><b id='Vnhim'><form id='Vnhim'><ins id='Vnhim'></ins><ul id='Vnhim'></ul><sub id='Vnhim'></sub></form><legend id='Vnhim'></legend><bdo id='Vnhim'><pre id='Vnhim'><center id='Vnhim'></center></pre></bdo></b><th id='Vnhim'></th></span></q></dt></tr></i><div id='Vnhim'><tfoot id='Vnhim'></tfoot><dl id='Vnhim'><fieldset id='Vnhim'></fieldset></dl></div>
        • <bdo id='Vnhim'></bdo><ul id='Vnhim'></ul>
            <tfoot id='Vnhim'></tfoot>

                  <tbody id='Vnhim'></tbody>
                本文介绍了如何将阿拉伯字符插入到 SQL 数据库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                如何将阿拉伯字符插入到 SQL Server 数据库中?我尝试将阿拉伯语数据插入表中,插入脚本中的阿拉伯语字符作为 '??????' 插入表中.

                How can I insert Arabic characters into a SQL Server database? I tried to insert Arabic data into a table and the Arabic characters in the insert script were inserted as '??????' in the table.

                我尝试通过SQL Server Management Studio直接将数据粘贴到表中,成功准确地插入了阿拉伯字符.

                I tried to directly paste the data into the table through SQL Server Management Studio and the Arabic characters was successfully and accurately inserted.

                我四处寻找解决此问题的方法,一些线程建议将数据类型更改为 nvarchar 而不是 varchar.我也试过这个,但没有任何运气.

                I looked around for resolutions for this problems and some threads suggested changing the datatype to nvarchar instead of varchar. I tried this as well but without any luck.

                如何在 SQL Server 数据库中插入阿拉伯字符?

                How can we insert Arabic characters into SQL Server database?

                推荐答案

                对于能够存储 unicode 字符的字段,您必须使用类型 nvarchar(或其他类似的类似 ntext, nchar).

                For the field to be able to store unicode characters, you have to use the type nvarchar (or other similar like ntext, nchar).

                要在数据库中插入 unicode 字符,您必须使用 nvarchar/SqlDbType.NVarChar 等参数类型将文本作为 unicode 发送.

                To insert the unicode characters in the database you have to send the text as unicode by using a parameter type like nvarchar / SqlDbType.NVarChar.

                (为了完整起见:如果您正在动态创建 SQL(反对常见建议),您可以在字符串文字前放置一个 N 以使其成为 unicode.例如:insert into table (name) values (N'Pavan').)

                (For completeness: if you are creating SQL dynamically (against common advice), you put an N before a string literal to make it unicode. For example: insert into table (name) values (N'Pavan').)

                这篇关于如何将阿拉伯字符插入到 SQL 数据库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何访问默认的 Rails sqlite 数据库? 下一篇:phpMyAdmin 中不显示阿拉伯字符

                相关文章

                最新文章

                <tfoot id='rQ4lt'></tfoot>

                <i id='rQ4lt'><tr id='rQ4lt'><dt id='rQ4lt'><q id='rQ4lt'><span id='rQ4lt'><b id='rQ4lt'><form id='rQ4lt'><ins id='rQ4lt'></ins><ul id='rQ4lt'></ul><sub id='rQ4lt'></sub></form><legend id='rQ4lt'></legend><bdo id='rQ4lt'><pre id='rQ4lt'><center id='rQ4lt'></center></pre></bdo></b><th id='rQ4lt'></th></span></q></dt></tr></i><div id='rQ4lt'><tfoot id='rQ4lt'></tfoot><dl id='rQ4lt'><fieldset id='rQ4lt'></fieldset></dl></div>

                    • <bdo id='rQ4lt'></bdo><ul id='rQ4lt'></ul>
                  1. <legend id='rQ4lt'><style id='rQ4lt'><dir id='rQ4lt'><q id='rQ4lt'></q></dir></style></legend>

                    <small id='rQ4lt'></small><noframes id='rQ4lt'>