易截截图软件、单文件、免安装、纯绿色、仅160KB

asp连接mysql

以mysql5.1为例
先下载mysql-connector-odbc并安装
1、直接连接
conn.asp
<%
strconnection="driver={mysql odbc 5.1 driver};database=test1;server=localhost;uid=root;password=root"
set conn = server.createobject("adodb.connection")
conn.open strconnection
%>
2、DSN连接
需要先在数据源 (ODBC)里的“系统DSN”中添加DSN“AAa”,在“用户DSN”中添加不一定能连接上!
<%
strConnection = "dsn=AAa;"
set conn = server.createobject("adodb.connection")
conn.open strconnection
%>


相关文档:

asp多风格分页类

 <%
'asp多风格分页类
'使用范例
'==========================================================================
'Set test = New Page '创建啦
'test.CurrentPage=1 '自己去读取拉,当前的页数
'test.temp="{N1}{N2}{N3} {N4}"'这里是显示的模版,自己可以定义,至于标签,可以自己去那个类里找
'test.Exec "S ......

asp上传类

 1.UpLoadClass.asp
<%
Class UpLoadClass
Private p_MaxSize,p_FileType,p_SavePath,p_AutoSave,p_Error
Private objForm,binForm,binItem,strDate,lngTime
Public FormItem,FileItem
Public Property Get Version
Version=""
End Property
......

asp Access数据备份,还原,压缩类

 <!--#include file="config.asp" -->
<!--#include file="Fun.asp" -->
<%
'数据库管理类
class Datas
'备份
public sub Bk()
Set fso=server.createobject("scripting.filesystemobject")
fso.CopyFile Server.MapPath(SiteDataPath),Server.MapPath(SiteDataBakPath)
......

Asp中Response.write出现乱码


现象:普通的html文字显示正常,但用response.write等asp代码输出的文字就出现乱码
解决方法:起初以为是浏览器编码出错的原因,所有在代码中加入
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
但还是出现乱码,问题没解决,上面的代码指定的是html静态文字的编码
最后查资料反省是c ......

asp to html

<!--#include file="inc/conn.asp" -->
<%
openconn()
sql="select * from tbnews"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
id=rs("id")
%>
<%
do while not rs.eof
%>
<%
Do_Url = "http://"
'Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号