How to trim a SQL statement?

Results 1 to 2 of 2

Thread: How to trim a SQL statement?

  1. #1
    Jeff Stana Guest

    Default How to trim a SQL statement?

    I have a Access db containing names only, to hyperlinked files.<BR>I am successfully returning recordsets upon submitting a search string. (SELECT FROM WHERE LIKE...)<BR>The response dumps into a string, sic: "&#060;a href=&#039" & rs.Fields() & "&#060;/a&#062;"&#039&#062;"...etc.<BR>This gives me hyperlinks to the requested file.<BR>THE PROBLEM: the virtual path in the "link" includes the folder where the db resides (<BR>I don&#039t want to place the data files in the same (or a subfolder)from where the db exists.<BR>HOW DO I TRIM THE PATH IN THE RETURNED SQL STATEMENT, SO I CAN PLACE MY DATA FILES IN MY CONTENT FOLDER?<BR>

  2. #2
    Nathen Grass Guest

    Default RE: How to trim a SQL statement?

    There are numerous ways to do this using string manipulation. In my opinion the easiest way would be to use the split funcion:<BR><BR>strTemp = objRS("Path")<BR>arrTemp = split(strTemp,"/")<BR>&#039The file name will be the last item in the array.<BR>strFile = arrTemp(UBound(arrTemp()))<BR><BR>Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts