The URL for a folder is just like the URL for a file except that it doesn't have a file name - it just finishes with the folder name (and its final /). Either way iot's just a string that you can save in a database like any other string.
Please decide what question you are asking, then maybe someone will be able to give the answer. Your latest post is nothing like the original "save a folder path in the sql server database and retrive it again". In every post you change the question.
So, you are still not giving enough info. "when i click on the folder the program will take the url of the folder" click on it where? On the desktop, in a list box, on a web page??? "take" it in what sense?
Please take the time to describle fully what you are trying to do, in what context, and exactly what it is you don't know how to do.
Depend if you desktop app you will use control like openfiledialog to retrieve physical path
If you use asp.net you will upload control to get it after that insert in db with column have varchar datatype
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...