title: Read Text File in Stored Procedure
body: <p>I want to use a stored procedure to update a table in mongoDB.  The data is in a CSV file and I want to access it with split.  I've done this any number of times in JavaScript with no problems. What I have for the start is:</p>
  
  <pre><code>var fso = new ActiveXObject("Scripting.FileSystemObject");
  var ForReading = 1;
  var daFile = fso.OpenTextFile("C:\\MyFolder\\myfile.dat",ForReading);
  while (!daFile.AtEndOfStream)
  { 
      daLine = daFile.readLine();
      // do the stuff
  } 
  </code></pre>
  
  <p>But the command chokes on the ActiveXObject.  I'm guessing that mongo doesn't know from ActiveXObjects so what can I use instead to read the lines from the file?</p>