日期:2014-05-17 浏览次数:21245 次
<% connstr="DBQ="+server.mappath("data/#saiyi_system#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" set conn=server.createobject("ADODB.CONNECTION") conn.open connstr Dim WebName,webcopyright,webaddress,webtel,websupport set rs=server.createobject("adodb.recordset") sql="select * from sys_company order by id desc" rs.open sql,conn,3,3 WebName = rs("company") Webcopyright = rs("copyright") Webaddress = rs("address") Webtel = rs("tel") Websupport = rs("support") function nosql(str) if not isnull(str) then str=trim(str) str=replace(str,";",";") '分号 str=replace(str,"'","'") '单引号 str=replace(str,"""",""") '双引号 str=replace(str,"chr(9)"," ") '空格 str=replace(str,"chr(10)","<br>") '回车 str=replace(str,"chr(13)","<br>") '回车 str=replace(str,"chr(32)"," ") '空格 str=replace(str,"chr(34)",""") '双引号 str=replace(str,"chr(39)","'") '单引号 str=Replace(str, "script", "script")'jscript str=replace(str,"<","<") '左< str=replace(str,">",">") '右> str=replace(str,"(","(") '左( str=replace(str,")",")") '右) str=replace(str,"--","--") 'SQL注释符 nosql=str end if end function %>