How can i copy a directory path in a string?
For example, the Location of the file is "C:\Folder1\Folder2\mydatabase.mdb".
i have an existing code,
Dim dbpath as String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim OpenFileDialog As New OpenFileDialog
OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
OpenFileDialog.Filter = "Access DB 2007 (*.accdb)|*.accdb|Access DB 2003(*.mdb)|*.mdb"
If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.Ok) Then
Dim FileName As String = OpenFileDialog.FileName
'dbpath = ??????????? location of the dbpath
End If
End Sub
Please Help me, I need the path in order for me to Connect to another database dynamically..