c# - System.IO.FileMode.Open -


for system, first need read csv file , need connect database in sql server 2008 according data in .ini file.

i use system.io.filestream() read file. there no problem open , read data.

but, when read csv file , connect database , cant access .ini file because system.io.filestream() function take path of ini file location of csv file.

so, when read csv file desktop , system.io.filestream() function search ini file in desktop , when read document, search in document.

thus, want know how control this.

my function read ini file : system.io.filestream("filenameonly", system.io.filemode.open, system.io.fileaccess.read);

you can set openfiledialog.restoredirectory true have dialog reset location on each use.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -