title: System.IO.FileMode.Open
body: <p>For my system, i first need to read CSV file and then i need to connect to the database in SQL server 2008 according to the data in .ini file.</p>
  
  <p>I use System.IO.FileStream() to read file. There is no problem to open and read data.</p>
  
  <p>But, when i read csv file and then connect to the database , i cant access to the .ini file 
  because System.IO.FileStream() function take the path of ini file like as the location of csv file. </p>
  
  <p>So, when i read csv file from Desktop , System.IO.FileStream() function search the ini file in Desktop and when i read from My Document, it search in My Document.</p>
  
  <p>Thus, i want to know how to control this.</p>
  
  <p>My function to read ini file : System.IO.FileStream("fileNameOnly", System.IO.FileMode.Open, System.IO.FileAccess.Read);</p>