使用方法:保存为asptools.hta然后再运行
代码如下:
<!doctype html public' - // W3C // DTD XHTML 1.0 Transitional // en'“” http://www.w.org/tr/tr/xhtml1/dtd/xhtml1--
transitional.dtd“>
<html xmlns =“ http://www.w3.org/1999/xhtml”>
<头>
<meta http-equiv =“ content-type” content =“ text /html; charset = gb2312” />
<meta name =“作者” content =“柳永法” />
<title> ASP </title>
<样式>车身{font-size:12px} </style>
<hta:应用程序
id =“ asptools”
ApplicationName =“ Asptools”
滚动=“否”
singleSinstance =“是”
WindowState =“正常”
>
</head>
<身体>
<div>
<input type =“ file” id =“ txtfile” onChange =“ createtableselect('access')” style =“ display:none” />
ip:<input type =“ text” name =“ ip” size =“ 16”样式=“边界:1px固体绿色”值=” ./ sql2005“ />
登录名:<input type =“ text” name =“ userId” size =“ 10”样式=“ border =” border:1px固体绿色“ value” value =“ sa” />
密码:<input type =“密码” name =“ pwd” size =“ 10” style =“ border =” border:1px实心绿色“ value” value =“ yongfa365” />
数据库名:<input type =“ text” name =“ dbname” size =“ 10” style =“ border:1px固体绿色”值=“ HB605-8-8” /> <br />
<input name =“ button2” type =“ button” id =“ button2” style =“ border =” border:1px固体绿色“ onclick =” createTablesElect
('mssql')“ value =”连接sql数据库“ />
<input type =“ button” id =“ btnfromfile” onclick =“ txtfile.click()” value =“连接访问” style =“ border =” border:1px solid
绿色” />
<span ID =“表”> </span>
<hr />
模板:
<input type =“ text” id =“ opt” value =“” size =“ 40” />
<select size =“ 1”
<input name =“ button” type =“ button” id =“ button” onclick =“ c()” value =“ tyled” style =“ border =” border:1px固体绿色“>
<hr />
<textarea id =“ s” lows =“ 10” cols =“ 80”> </textarea>
<input type =“ button” onclick =“ madesql()” value =“ sql s style =” border =“ border:1px固体绿色” />
<textarea id =“ d” rows =“ 10” cols =“ 80”> </textarea>
</div>
<pre id =“ sqldemo” style =“ display:none” into =“通用建表结构”>
- 通用建表结构
创建表[DBO]。[tableName](
[id] int主键身份(1,1), - id,主键,自动号
[txttitle] varchar(255), - 标题
[txtContent]文字, - 内容
[puttime] dateTime默认值(getDate()), - 提交时间
[moditime] dateTime默认(getDate()), - 修改时间
[命中] int默认(0), - 点击数
[flags] int默认(0), - 标识
[orderid] int默认(0), - 排序号
)
</pre>
<pre id =“ sdemo” style =“ display:none” into =“初始源测试数据”>