Hi,
I am trying to work out how to export/import information from an asp page into a csv file.
The csv file contains employee names and their department in 2 columns..Name and Team. What I want to be able to do is to add and remove names from this page using a submit function
As you can see from my code I am currently able to view 2 columns from the csv file in dropdown boxes on my asp page. I don't however how to overwrite records in it should someone change teams or delete someone if they leave
Any pointers or assistance would be apppreciated
I am trying to work out how to export/import information from an asp page into a csv file.
The csv file contains employee names and their department in 2 columns..Name and Team. What I want to be able to do is to add and remove names from this page using a submit function
As you can see from my code I am currently able to view 2 columns from the csv file in dropdown boxes on my asp page. I don't however how to overwrite records in it should someone change teams or delete someone if they leave
Any pointers or assistance would be apppreciated
Code:
</table>
<%
set rs = Server.CreateObject("ADODB.recordset")
set rs1 = Server.CreateObject("ADODB.recordset")
Dim sConn, sSource, sResults
sConn = "DRIVER={Microsoft Text Driver (*.txt; *.csv)};" & "DefaultDir=" & "\\nsyd9009pap\c$\Inetpub\[URL unfurl="true"]wwwroot\GMS_Stats\Stats\db2\"[/URL] & ";Extensions=asc,csv,tab,txt"
sSource = "Select [Name] FROM [TestEmployees.csv]"
sSource1 = "Select [Team] FROM [TestEmployees.csv]"
rs.Open sSource, sConn, adOpenKeyset
rs1.Open sSource1, sConn, adOpenKeyset
%>
<table>
<tr>
<td>Name</td>
</tr>
</table>
<select>
<%for each x in rs.Fields
next%>
<%do until rs.EOF%>
<%for each x in rs.Fields%>
<option value=<<%Response.Write(x.value)%>><%Response.Write(x.value)%></option>
<%next
rs.MoveNext%>
<%loop
rs.close
%>
</table>
<table>
<tr>
<td>Team</td>
</tr>
</table>
<table>