我使用下面的代码从数据库中检索信息,然后将它写出来的html页面ASP的Unicode:检索使用2005年SQLSERVER
Dim strDSN, cnn, cmd
strDSN = "Driver={SQL Server};" & "Server=(local)\sql2k5;" & ...
set cnn = Server.CreateObject("ADODB.Connection")
cnn.ConnectionString = strDSN
cnn.CursorLocation = adUseClient
cnn.Open
set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = cnn
cmd.CommandText = "select Message from tblRecipients where ID = 72"
cmd.CommandType = adCmdText
set getRecordset = Server.CreateObject("ADODB.Recordset")
getRecordset.Open cmd, , adOpenKeyset, adLockReadOnly
Response.write getRecordset("Message")
但是我得到的是“??? ????”。我检查了它不是浏览器,这是实际写出来的。
要插入邮件我运行 更新tblRecipients设置消息=N'Добре'其中ID = 72 在SQL服务器管理器中。
如何让它正确显示的任何帮助?