欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

從文本文件中讀取信息并存儲(chǔ)入數(shù)據(jù)庫(kù)

 更新時(shí)間:2006年12月14日 00:00:00   作者:  
<% 
dim fso,f1
Const ForReading = 1
set fso=createobject("Scripting.FileSystemObject")
''使用fso對(duì)象讀取信息。
set f1=fso.OpenTextFile("E:\doit\info2.txt", ForReading)
''打開(kāi)要讀取的文件
dim conn,rst

set conn=server.createobject("adodb.connection")
''建立數(shù)據(jù)庫(kù)連接,執(zhí)行操作
set rst=server.createobject("adodb.recordset")

conn.open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.mappath("db1.mdb")

rst.activeconnection=conn

dim fread

do while not f1.atEndOfStream 
''用do... loop循環(huán)體插入數(shù)據(jù)
fread=f1.readline

line=split(fread,":::")

rst.source="insert into barcode1(barcode1) values ("&trim(line(0))&")"
rst.open
loop

f1.close
conn.close
''''all over
%>

相關(guān)文章

最新評(píng)論