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 中常用的文件处理函数 收藏
asp 中处理文件上传以及删除时常用的自定义函数
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'所有自定义的VBS函数
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function DeleteFile(Filename) '删除文件
&nbs ......
我写了个程序,本地运行完全正常,上传到服务器在服务器上操作有时候能正常操作,但是运行一会儿就服务器连接超时,然后就不能正常操作了,关闭网页,打开还是不能连接数据库操作,等半小时后或者更久又能正常了,请问这个是怎么回事?本地随时都能正常运行切找不出任何问题。高手帮帮忙啊! ......
1.记录集关闭之前再次打开:
------------------------------------
sql="select * from test"
rs.open sql,conn,1,1
if not rs.eof then
dim myName
myName=rs("name")
end if
sql="select * from myBook"
rs.open sql,conn,1,1
------------------------------------ ......
注:本人安装的是Windows 7 RC 7100 32位中文旗舰版 。
在Windows 7下面IIS7的安装方法:
一、进入Windows 7的 控制面板
,选择左侧的 打开或关闭Windows功能
。
二、现在出现了安装Windows功能的选项菜单
,注意选择的项目,我们需要手动选择
需要的功能,下面这张图片把需要安装的服务都已经选择了,大家可以按照 ......