<% dim conn set conn=server.createObject("ADODB.Connection") conn.open "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=ToolKeyWord;Data Source=localhost" Set rs = Server.CreateObject("ADODB.Recordset") whichfile=server.mappath("keyword.txt") Set fso = CreateObject("Scripting.FileSystemObject") Set txt = fso.OpenTextFile(whichfile,1) While Not txt.AtEndOfStream rline =txt.ReadLine'逐行读取 conn.execute "insert into KeyWord (KeyWordName) values ('"&rline&"')" Response.Write rline&"<br>" wend %>