1 |
Function checkCSV(getThisFile)<br><br> Const ForReading = 1<br> counter = 0<br> <br> Dim objFSO , objTextStream , strText , strFileName, output<br> <br> strFileName = Server.MapPath(getThisFile)<br> <br> Set objFSO = Server.CreateObject('Scripting.FileSystemObject')<br> Set objTextStream = objFSO.OpenTextFile(strFileName , ForReading , False)<br> <br> If not objTextStream.AtEndOfStream Then<br> Do While not objTextStream.AtEndOfStream<br> strText = objTextStream.ReadLine<br> arrText = split(strText, ';', 9)<br> <br> if arrText(0) = Request.Form('id') then<br> checkCSV = arrText<br> end if<br> <br> counter = counter + 1<br> Loop<br> End If<br> <br> objTextStream.Close<br> Set objFSO = Nothing<br> Set objTextStream = Nothing<br>end Function |