ASP - Doesn't accept spaces in file path

Thank you for looking at my question,

I am trying to build an intranet page that shows links to pdf files on a company's server.

The documents are resident in sub-drectory of a shared folder "Company Shared Folders/..."

The virtual directory name I have used on the web server has no spaces in it's name.

The code I am using is as follows:

Connection string

where = request("server_name")
strconn1 = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("dbase/documentation.mdb") & ";"

Query string

                  Set con = Server.CreateObject("ADODB.Connection")
                  con.Open strconn1, "", ""

                  strSQL = "SELECT * FROM tblDocumentation WHERE intCatSubNumber = " & id

                  Set rst = Server.CreateObject("ADODB.Recordset")
                  rst.Open strSQL, con, adOpenStatic, adLockReadOnly, adCmdText

                  If Not rst.EOF Then

                        Response.write("<table border=""5"" cellspacing=""0"" width=""600"" cellpadding=""0"" bordercolor=""Red"">" & vbCrLf)
                        Do While Not rst.EOF
                              Response.write("<tr>" & vbCrLf)

                              Response.write("<td align=""center""><p class=""menulink""><font size=""2""><a href=""default2.asp?id=" & rst("txtDocumentPath") & """>" & rst("txtDocumentName") & "</a></font></td>" & vbCrLf)
                              'Response.write("<td align=""center""><p class=""menulink""><font size=""2""><a href="" & rst("txtDocumentPath") & """>" & rst("txtDocumentName") & "</a></font></td>" & vbCrLf)
                              Response.write("</tr>" & vbCrLf)
                        Response.write("<tr>" & vbCrLf & "<td colspan=""2""><img border=""0"" src=""pad.gif"" width=""2"" height=""2""></td>" & vbCrLf & "</tr>" & vbCrLf & "</table>" & vbCrLf)

How do I get the system to handle the spaces in the path?

Gary CroxfordOperations Support AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun KlineLead Software EngineerCommented:
Try URL encoding the document path:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.