asp引用dll出现乱码
asp连接代码如下:Dim ConnDim ConDB
Dim StrConn
set ConDB = Server.CreateObject("conn.dll")
set conn = Server.CreateObject("ADODB.CONNECTION")
'ConDB就是创建的DLL对象
StrConn = ConDB.ConnectDB()
'连接两部分内容组成字符串
conn.Open StrConn
If Err Then
err.Clear
Set conn = Nothing
Response.Write "数据库连接失败!"
Response.End
End If
asp文件代码如下:
<!--#include file="conn.asp"-->
<%
dim ss
ss=unescape(request.QueryString("name"))
'Set M= Server.CreateObject("ADODB.Recordset")
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM Userinfo WHERE code='"&ss&"'",conn,adOpenDynamic,adLockPessimistic
'sql="CREATE NONCLUSTERED INDEX Ix ON Userinfo(code) WITH FILLFACTOR= 30"
'M.open sql,1,3
if ss="" then
response.Write escape( "<img align='absmiddle' src='images/hint.png'/>"+" 请填写帐号!")
else
if rs.eof then
response.Write escape("<img align='absmiddle' src='images/tick.png'>")
else
response.Write escape( "<img align='absmiddle' src='images/hint.png'/>"+" 此账号已被使用,请重新填写!")
end if
end if
%>
<%rs.close:conn.close
%>
jquery代码如下: $.get("check1.asp?name="+escape(name),function(data){
var text=unescape(data);
//document.getElementById("dd").innerHTML=text;
$("#dd").html(text).show();
})
}
怎么会出现乱码,请大侠分析一下