码迷,mamicode.com
首页 > 数据库 > 详细

asp 数据库 模块化 - 思路是没一个页面有一个自己的数据类 这里用nPath表示

时间:2015-08-27 21:07:55      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

<!--#include file="db_class.asp" -->
<%
‘当前页面数据
nPath = "..\..\.."


‘t模块的数据
tMdb = "\newbox\nWork\mytest\m.mdb"

set db = new db_class
‘db.conn_open(lib.dbPath)‘打开数据库
db.conn_open(server.MapPath(nPath+tMdb))‘打开数据库

‘获得数据
set rs = db.getRsById(rs,"sysT",1)




%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<%=rs("mStr")%>
</body>
</html>
<%
db.conn_close()
%>

  

asp 数据库 模块化 - 思路是没一个页面有一个自己的数据类 这里用nPath表示

标签:

原文地址:http://www.cnblogs.com/pengpengsay/p/4764422.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!