婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > ASP 輔助工具(hta版)

ASP 輔助工具(hta版)

熱門標(biāo)簽:哈爾濱外呼系統(tǒng)代理商 湛江電銷防封卡 佛山防封外呼系統(tǒng)收費(fèi) 徐州天音防封電銷卡 電話機(jī)器人適用業(yè)務(wù) 南昌辦理400電話怎么安裝 鄭州智能外呼系統(tǒng)運(yùn)營(yíng)商 不錯(cuò)的400電話辦理 獲客智能電銷機(jī)器人
使用方法:保存為ASPTools.hta然后再運(yùn)行
復(fù)制代碼 代碼如下:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
html xmlns="http://www.w3.org/1999/xhtml">
head>
meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
meta name="author" content="柳永法" />
title>ASP輔助工具/title>
style>body{ font-size:12px}/style>
HTA:APPLICATION
ID="ASPTools"
APPLICATIONNAME="ASPTools"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
>
/head>
body>
div>
input type="file" id="txtFile" onchange="CreateTableSelect('ACCESS')" style="display:none" />
IP:input type="text" name="IP" size="16" style="border:1px solid green" value=".\sql2005" />
登錄名:input type="text" name="UserID" size="10" style="border:1px solid green" value="sa" />
密碼:input type="password" name="pwd" size="10" style="border:1px solid green" value="yongfa365" />
數(shù)據(jù)庫(kù)名:input type="text" name="dbname" size="10" style="border:1px solid green" value="hb605-8-8" />br />
input name="button2" type="button" id="button2" style="border:1px solid green" onclick="CreateTableSelect
('MSSQL')" value="連接SQL數(shù)據(jù)庫(kù)" />
input type="button" id="btnFromFile" onclick="txtFile.click()" value="連接ACCESS數(shù)據(jù)庫(kù)" style="border:1px solid
green" />
span id="Tables" >/span>

    hr />
    模板:
    input type="text" id="opt" value="" size="40" />
    select size="1" id="fz" onchange="opt.value=this.value" style="width:200px">/select>
    input name="button" type="button" id="button" onclick="c()" value="轉(zhuǎn)換" style="border:1px solid green">
    hr />
    textarea id="s" rows="10" cols="80" style="width:98%">/textarea>
    input type="button" onclick="MadeSQL()" value="生成SQL語(yǔ)句" style="border:1px solid green" />
    textarea id="d" rows="10" cols="80" style="width:98%">/textarea>
/div>


pre id="SQLDEMO" style="display:none" intro="通用建表結(jié)構(gòu)">
--通用建表結(jié)構(gòu)
Create Table [dbo].[tablename] (
[ID] int primary key identity(1,1),--ID,主鍵,自動(dòng)號(hào)
[txtTitle] varchar(255),--標(biāo)題
[txtContent] text,--內(nèi)容
[PutTime] datetime Default (getdate()),--提交時(shí)間
[ModiTime] datetime Default (getdate()),--修改時(shí)間
[Hits] int Default (0),--點(diǎn)擊數(shù)
[Flags] int Default (0) ,--標(biāo)識(shí)
[OrderID] int Default (0),--排序號(hào)
)
/pre>

pre id="sDemo" style="display:none" intro="初始源測(cè)試數(shù)據(jù)">
UserName
Password
Sex
TrueName
Age
Tel
MSN
QQ
Email
/pre>

pre id="fzDemo" style="display:none" intro="輔助輸入">
輔助輸入
rs("$1") = Request("$1")
rs("$1") = SafeRequest("$1")
$1 = Request("$1")
$1 = SafeRequest("$1")
tr>td>$1:/td>td>input type="text" name="$1" size="20">/td>/tr>
/pre>

hr />
建議查看源文件然后保存為ASPTools.hta然后再運(yùn)行

script language="VBScript" type="text/vbscript">
self.Focus()
self.ResizeTo 620, 520

'初始化數(shù)據(jù)
s.Value = sDemo.innerHTML

fzs = Split(fzDemo.innerHTML, vbCrLf)
For Each optTemp In fzs
Set o = document.createElement("Option")
o.text = optTemp
o.Value = optTemp
fz.Add o
Next

opt.Value = fz.options(1).Value


'程序運(yùn)行時(shí)的一些函數(shù)

Function c()
ss = Split(s.Value, vbCrLf)
For Each sss in ss
If sss>"" Then Str = Str Replace(opt.Value, "$1", sss) vbCrLf
Next
d.Value = Str
End Function

Dim xCat '定義全局變量,避免重復(fù)鏈接數(shù)據(jù)庫(kù)。

Function CreateTableSelect(dbType)
Set xCat = CreateObject("ADOX.Catalog")
If dbType = "ACCESS" Then
xCat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" txtFile.Value
ElseIf dbType = "MSSQL" Then
xCat.ActiveConnection = "Provider=SQLOLEDB.1; Persist Security Info=True; Data Source=" IP.Value ";
Initial Catalog=" dbname.Value "; User ID=" UserID.Value "; Password=" pwd.Value
End If

For Each xTable in xCat.Tables
tableType = xTable.Type
If tableType = "TABLE" Then
TablesS = TablesS "option value='" xTable.Name "'>" xTable.Name "/option>"
End If
Next
Tables.innerHTML = " select name='NowTables' onchange='CreateFieldSelect(""" dbType """)'>option>==請(qǐng)選擇
表名==/option>" TablesS "/select>"

End Function



Function CreateFieldSelect(dbType)
Dim Item
For Each xTable in xCat.Tables
If xTable.Name = NowTables.Value Then
For Each Item in xTable.Columns
Str = Str + Item.Name vbCrLf
Next
Exit For
End If
Next
s.Value = Left(Str, Len(Str) -2)
End Function

Function MadeSQL()
yongfa365Fields = Split(s.Value, vbCrLf)
yongfa365Code2 = ""
For Each sql in yongfa365Fields
If sql>"" Then strSQL = strSQL " [" sql "] varchar(50),"
Next
strSQL = Left(strSQL, Len(strSQL) -1)
yongfa365Code2 = "Create Table TableName(" vbCrLf Replace(strSQL, ",", "," vbCrLf) vbCrLf ")" vbCrLf
vbCrLf

TempValue = Join(yongfa365Fields, " ""','"" objItem.")
yongfa365Code2 = yongfa365Code2 "Conn.Execute ""insert into Info (" Join(yongfa365Fields, ",") ") values
('"" objItem." TempValue " ""')""" vbCrLf vbCrLf vbCrLf

TempValue = Join(yongfa365Fields, """) ""','"" rs(""")
yongfa365Code2 = yongfa365Code2 "Conn.Execute ""insert into Info (" Join(yongfa365Fields, ",") ") values
('"" rs(""" TempValue """) ""')""" vbCrLf vbCrLf vbCrLf

TempValue = Join(yongfa365Fields, " ""','"" ")
yongfa365Code2 = yongfa365Code2 "Conn.Execute ""insert into Info (" Join(yongfa365Fields, ",") ") values
('"" " TempValue " ""')""" vbCrLf vbCrLf vbCrLf

d.Value = SQLDEMO.innerHTML String(2, vbCrLf) yongfa365Code2
End Function

Function reReplace(Str, restrS, restrD)
Set re = New RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = restrS
reReplace = re.Replace(Str, restrD)
End Function


/script>
/body>
/html>

為防止出錯(cuò),特給打包下載地址

標(biāo)簽:廣西 蘭州 吉安 懷化 紹興 蕪湖 呂梁 安康

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ASP 輔助工具(hta版)》,本文關(guān)鍵詞  ASP,輔助工具,hta,版,ASP,輔助工具,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《ASP 輔助工具(hta版)》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于ASP 輔助工具(hta版)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 大名县| 逊克县| 永修县| 宜兴市| 大安市| 乡城县| 平江县| 麟游县| 台中县| 德江县| 舒兰市| 梁平县| 东莞市| 尚志市| 延寿县| 通道| 涟水县| 石阡县| 云林县| 福清市| 武定县| 宿松县| 法库县| 马龙县| 行唐县| 措美县| 丹巴县| 肥东县| 镇沅| 阆中市| 西峡县| 陵川县| 库尔勒市| 奉节县| 通化市| 霍邱县| 大丰市| 商河县| 鄂伦春自治旗| 昆山市| 温州市|