使用RecordSet.Update将unicode字符插入数据库 [英] Inserting unicode characters into a database using RecordSet.Update

查看:108
本文介绍了使用RecordSet.Update将unicode字符插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP,VBScript和SQL Server。


我也使用UTF-8字符集,所以我的代码页是65001和SQL

服务器数据类型nvarchar。


我可以使用

INSERT ....(field1)将unicode字符正确插入数据库表... VALUES .........(N''Characters'')。


如何使用Rs.Update viz-a-viz执行此操作:


Rs.Open .......

Rs.New

Rs(" Field1")=" Characters"

Rs.Update


感谢您的期待。

解决方案

Roger Withnell写道:

我正在使用ASP,VBScript和SQL Server。

我也使用UTF-8字符集,所以我的代码页是65001和SQL
服务器数据类型nvarchar。

我可以正确地将unicode字符插入到数据库表中
使用INSERT ....(field1)... VALUES ........ 。(N' '人物'')。

既然你可以这样做......

如何使用Rs.Update viz-a-viz执行此操作:


为什么你会想要使用记录集更新asp

应用程序中的数据?


-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。




" Bob Barrows [MVP] " <再****** @ NOyahoo.SPAMcom>在消息中写道

新闻:uq ************* @ TK2MSFTNGP05.phx.gbl ...

Roger Withnell写道:

我正在使用ASP,VBScript和SQL Server。

我也使用UTF-8字符集,所以我的代码页是65001和SQL
服务器数据类型nvarchar。

我可以使用INSERT ....(field1)正确地将unicode字符插入到数据库表中... VALUES .........(N' 'charactersqu'>。


因为你可以这样做...

我如何使用Rs.Update viz-a-viz执行此操作:


为什么你会想要使用记录集更新asp
应用程序中的数据?




因为我'' m同时插入图像,使用AspUpload和AspJpeg创建缩略图和

主图像。


Roger Withnell写道:

为什么你会想要在asp应用程序中使用记录集更新数据?



因为我在同一时间插入图像,所以创建一个
缩略图和主图像,使用AspUpload和AspJpeg。




您仍然可以在不使用记录集的情况下完成此操作。例如,将File.Binary属性的

属性分配给ADODB.Command

对象的参数。


-

戴夫安德森


未经请求的商业电子邮件将以

的费用阅读

I''m using ASP, VBScript and SQL Server.

I''m also using UTF-8 character set and so my codepage is 65001 and SQL
Server datatype nvarchar.

I can insert unicode characters correctly into the database table using
INSERT.... (field1) ...VALUES ......... (N''Characters'').

How do I do this using Rs.Update viz-a-viz:

Rs.Open .......
Rs.New
Rs("Field1") = "Characters"
Rs.Update

Thanking you in anticipation.

解决方案

Roger Withnell wrote:

I''m using ASP, VBScript and SQL Server.

I''m also using UTF-8 character set and so my codepage is 65001 and SQL
Server datatype nvarchar.

I can insert unicode characters correctly into the database table
using INSERT.... (field1) ...VALUES ......... (N''Characters'').
Since you can do it this way ...
How do I do this using Rs.Update viz-a-viz:


why would you ever want to use a recordset for updating data in an asp
application?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.



"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:uq*************@TK2MSFTNGP05.phx.gbl...

Roger Withnell wrote:

I''m using ASP, VBScript and SQL Server.

I''m also using UTF-8 character set and so my codepage is 65001 and SQL
Server datatype nvarchar.

I can insert unicode characters correctly into the database table
using INSERT.... (field1) ...VALUES ......... (N''Characters'').


Since you can do it this way ...

How do I do this using Rs.Update viz-a-viz:


why would you ever want to use a recordset for updating data in an asp
application?



Because I''m inserting images at the same time, creating a thumbnail and a
main image, using AspUpload and AspJpeg.


Roger Withnell wrote:

why would you ever want to use a recordset for updating data
in an asp application?



Because I''m inserting images at the same time, creating a
thumbnail and a main image, using AspUpload and AspJpeg.



You can still accomplish that without using recordsets. Assign the
properties of the File.Binary property to a parameter of an ADODB.Command
Object, for example.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of


这篇关于使用RecordSet.Update将unicode字符插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆