主頁(yè) > 知識(shí)庫(kù) > vbs生成ACCESS數(shù)據(jù)里所有表的字段

vbs生成ACCESS數(shù)據(jù)里所有表的字段

熱門標(biāo)簽:天津智能外呼系統(tǒng)排名 企業(yè)400電話辦理價(jià)錢低 外呼系統(tǒng)群 外呼系統(tǒng)說話聲音小怎么辦 機(jī)器人打電銷適用于美業(yè)嗎 墨西哥地圖標(biāo)注app 上海辦理400電話選號(hào) 智云億呼電話機(jī)器人 龍巖400電話申請(qǐng)
job id ="生成ACCESS數(shù)據(jù)庫(kù)里所有表及所有字段并生成一定格式的字符組合">
script language ="vbscript">
databasename ="access.mdb"''數(shù)據(jù)庫(kù)地址
tablename ="blogarticle"''要處理的表名


Set conn = CreateObject("ADODB.Connection")
connstr ="provider=microsoft.jet.oledb.4.0;data source="databasename
conn.Open connstr

Set rs_all = CreateObject("adodb.recordset")
sql_all ="select name from MSysObjects where type=1 and flags=0"
rs_all.Open sql_all, conn,1,1

DoWhileNot rs_all.EOF
    tablename = rs_all(0)
Set rs = CreateObject("adodb.recordset")
    sql ="select * from " tablename " where 1>1"
    rs.Open sql, conn,1,1
    j = rs.Fields.Count
    txtContent =""
    txtContent1 =""
    txtContent2 =""
    txtContent3 =""
    txtContent4 =""
For i =0To(j -1)
        title = rs.Fields(i).Name
        txtContent = txtContent  title "|"
        txtContent1 = txtContent1  title"=trim(request("""title"""))""br>"
        txtContent2 = txtContent2  title"=rs("""title""")br>"
        txtContent3 = txtContent3 "rs("""title""")=trim(request("""title"""))br>"
        txtContent4 = txtContent4  title"=rs("""title""")br>"
Next
    yongfa365 ="div align=center>a href=""http://www.yongfa365.com"" class=""titlink"" title=""柳永法(yongfa365)'Blog http://www.yongfa365.com"">柳永法(yongfa365)'Blog/a>制作/div>"title"里的字段br>br>"
    CreateFile tablename".html", yongfa365  txtContent "br>br>" txtContent1 "br>br>" txtContent2 "br>br>" txtContent3 "br>br>" txtContent4
    rs_all.movenext
Loop

Function CreateFile(FileName, Content)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fd = FSO.CreateTextFile(FileName,True)
    fd.WriteLine Content
EndFunction

/script>
/job>


job id ="生成ACCESS數(shù)據(jù)庫(kù)里指定表的所有字段并生成一定格式的字符組合">
script language ="vbscript">
databasename ="access.mdb"''數(shù)據(jù)庫(kù)地址
tablename ="blogarticle"''要處理的表名


Set conn = CreateObject("ADODB.Connection")
connstr ="provider=microsoft.jet.oledb.4.0;data source="databasename
conn.Open connstr

''Set rs_all = CreateObject("adodb.recordset")
''sql_all = "select name from MSysObjects where type=1 and flags=0"
''rs_all.Open sql_all, conn, 1, 1

''Do While Not rs_all.EOF
''    tablename = rs_all(0)
Set rs = CreateObject("adodb.recordset")
sql ="select * from " tablename " where 1>1"
rs.Open sql, conn,1,1
j = rs.Fields.Count
txtContent =""
txtContent1 =""
txtContent2 =""
txtContent3 =""
txtContent4 =""
For i =0To(j -1)
    title = rs.Fields(i).Name
    txtContent = txtContent  title "|"
    txtContent1 = txtContent1  title"=trim(request("""title"""))""br>"
    txtContent2 = txtContent2  title"=rs("""title""")br>"
    txtContent3 = txtContent3 "rs("""title""")=trim(request("""title"""))br>"
    txtContent4 = txtContent4  title"=rs("""title""")br>"
Next
yongfa365 ="div align=center>a href=""http://www.yongfa365.com"" class=""titlink"" title=""柳永法(yongfa365)'Blog http://www.yongfa365.com"">柳永法(yongfa365)'Blog/a>制作/div>"title"里的字段br>br>"
CreateFile tablename".html", yongfa365  txtContent "br>br>" txtContent1 "br>br>" txtContent2 "br>br>" txtContent3 "br>br>" txtContent4
''    rs_all.movenext
''Loop

Function CreateFile(FileName, Content)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fd = FSO.CreateTextFile(FileName,True)
    fd.WriteLine Content
EndFunction

/script>
/job>
您可能感興趣的文章:
  • VBS教程:屬性-DateLastAccessed 屬性
  • ACCESS的參數(shù)化查詢,附VBSCRIPT(ASP)和C#(ASP.NET)函數(shù)
  • UserAccessList 集合的功能(VBA)
  • excel2access vbs腳本
  • 讀取Access數(shù)據(jù)庫(kù)的vbscript代碼打包下載
  • VB6實(shí)現(xiàn)連接Access數(shù)據(jù)庫(kù)的ADODB代碼實(shí)現(xiàn)方法
  • VB使用ADO操作Access數(shù)據(jù)庫(kù)

標(biāo)簽:麗水 承德 阜新 錫林郭勒盟 鄂爾多斯 黃山 齊齊哈爾 青島

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《vbs生成ACCESS數(shù)據(jù)里所有表的字段》,本文關(guān)鍵詞  vbs,生成,ACCESS,數(shù)據(jù),里,所有,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《vbs生成ACCESS數(shù)據(jù)里所有表的字段》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于vbs生成ACCESS數(shù)據(jù)里所有表的字段的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章