ASP 读取*.CVS文件

[ 2009-06-18 22:42:00 | 作者: Admin ]
: | |
<%
SET Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq="&Server.mappath("./")&";Extensions=csv;Persist Security Info=False"

SET rs = server.CreateObject("ADODB.RecordSet")
rs.Open "Select * From 2004direction.csv", Conn

Do While Not(rs.Eof)
If (INSTR(rs(1), "上海") > 0 ) Then
Response.Write(rs(1) & "<br>")
End If
rs.MoveNext
Loop

rs.Close
%>
评论Feed 评论Feed: http://work.edufans.com/feed.asp?q=comment&id=111

这篇日志没有评论.

此日志不可发表评论.