gsc123
Programmer
- Jan 24, 2008
- 197
Hi
What is wrong with this please
<%
Dim conn, rs, arr
Dim csvfile
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
conn.Open = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=" & Server.MapPath("ESCORTLIST.csv")
csvfile = "ESCORTLIST"
Dim sql, f
sql = "SELECT * FROM "&csvfile
Set rs = conn.Execute("&sql&")
'Response.Write conn.ConnectionString
On Error resume next
For f = 0 To rs.Fields.Count-1
%><tr><TH><% = rs.Fields(f).name %></TH><%
%><TD><% = rs.Fields(f).value %></TD>
<% Next
Set rs = Nothing
conn.Close
Set conn = Nothing
%>
What is wrong with this please
<%
Dim conn, rs, arr
Dim csvfile
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
conn.Open = "Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=" & Server.MapPath("ESCORTLIST.csv")
csvfile = "ESCORTLIST"
Dim sql, f
sql = "SELECT * FROM "&csvfile
Set rs = conn.Execute("&sql&")
'Response.Write conn.ConnectionString
On Error resume next
For f = 0 To rs.Fields.Count-1
%><tr><TH><% = rs.Fields(f).name %></TH><%
%><TD><% = rs.Fields(f).value %></TD>
<% Next
Set rs = Nothing
conn.Close
Set conn = Nothing
%>