標籤:style http color 使用 os 檔案
easyasp的資料庫操作
下載easyasp.官網地址:http://www.easyasp.cn/downloads
檔案下載的檔案拷貝到工程根目錄下;
串連資料庫:easyasp>easp.config.asp 根據不同資料庫,取消掉前面的注釋符號然後配置。
mssql為例子:Easp.Db.SetConn "MSSQL", "資料庫名", "使用者名稱:密碼@(local)"
asp檔案中使用: 首先引入<!--#include file="easyasp/easp.asp" -->
然後建立與資料庫的串連:
<%dim sql,rssql="select * from 表名 where userid =6"set rs=easp.db.exec(sql)%>
最後調用:
<td><%=rs("realname")%></td>
<%Dim email,jg,uphone,address,username,ucardusername=easp.var("post.username")ucard=easp.var("post.idcard")email=Easp.var("post.u_email")jg=Easp.var("post.u_jiguan")uphone=Easp.var("post.uphone")address=Easp.var("post.u_address")If easp.var("do")="edit" ThenDim cduinfo_all_up cduinfo_all_up = Easp.Db.Upd("cduserjiaoyuan", "realname= {username}, tel= {uphone} ,jiguan={post.u_jiguan},address1={post.u_address},card={post.idcard},UserEmail={post.u_email}","userid=3")Easp.Str.JsAlert("修改成功!")End If%>
上述顏色標註的兩種調用方法均可實現調用!紅色標註的不用定義中間超級變數。