asp增加数据库表的字段代码
<%
'下面是最具技术含量的函数了,哈哈~
'增加数据库字段
function addziduan(ziduanming,ziduanleixing)
on error resume next
fldname = ziduanming
if ziduanleixing=1 or ziduanleixing=4 then
fldtype = "VarChar"
fldsize = 255
elseif ziduanleixing=2 or ziduanleixing=3 then
fldtype = "Text"
fldsize = ""
end if
fldnull = "ON"
fldautoincrement = ""
table_name = tables
if fldname <> "" and fldtype <> "" then
sql = "alter table [" & table_name & "] add ["&fldname&"] " & fldtype
if fldsize <> "" then
sql = sql & "(" & fldsize & ")"
end if
if fldnull <> "ON" then
sql = sql & " not null"
end if
conn.execute(sql)
if err <> 0 then
response.Write "<input type='button' name='ok' value=' 返 回 ' onClick='javascript:history.go(-1)'>"
end if
end if
end function
%>
相关文档:
asp衔接Mssql的办法及常见的差错
//第一种写法:
MM_conn_STRING = "Driver={SQL Server};server=(local);uid=sa;pwd=;database=infs;"
Set conn = Server.Createobject("ADODB.Connection")
conn.open MM_conn_STRING
SET RS=SERVER.CreateObject("ADOBD.recordset")
SQL="SELECT * from TABLE ORDER BY ID DESC"
R ......
asp 中常用的文件处理函数 收藏
asp 中处理文件上传以及删除时常用的自定义函数
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'所有自定义的VBS函数
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function DeleteFile(Filename) '删除文件
&nbs ......
最简单用VB把asp封装成dll的入门程序
当IIS被请求执行一个ASP程序,它首先会在ASP文件中找到<%%>标签之间的代码,并且执行它(也可以是<scri ptrunat=server></script....>之间的代码).如果这个ASP程序在先前被调用过,那么它就会用内存中的编译过的程序来向用户返回HTML代码,如果没有,那么它就重新编译.� ......
<% '--------------------------------------------------------------------------------------------------
Set rs9 = Server.CreateObject("ADODB.RecordSet")
sqlstr="select * from 客户资料库 order by id desc"
rs9.open sqlstr,conn,1,3
%>
<%Set fs = server.CreateObject( ......
ASP的漏洞已经算很少的了,想要找到数据库的实际位置也不简单,但这不表明黑客无孔可入,也正是这个观点,一般的程序设计员常常忘记仔细的检查是否有漏洞,所以才有可能导致网站资料被窃取的事件发生。今天我在这里和大家谈谈ASP常见的安全漏洞,以引起大家的重视及采取有效的防范措施。(注意,在本文中所介绍的方法请� ......