getting file path
Hi guys,
I want to open an Access File. So I need to get the file name (easy) and the respective path for making the connection string. How can i do it with an OpenFileDialog or something like that???
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
zhang limeiPosted Jun 22, 2007, 11:54 PM
{
textBox1.Text =openFileDialog1.FileName ;
}
AlanPosted Jun 22, 2007, 2:50 PM
The OpenFileDialog's FileName property returns the full path of the selected file:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.filedialog.filename(vs.80).aspx