Re: URL Encode via SQL?

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 06/19/04


Date: Sat, 19 Jun 2004 10:21:30 -0400

SQL Server doesn't know what a URL is, and doesn't know which characters
need to be encoded. You'd have to build your own function that steps
through each character in the string and rebuilds it, or runs a many-level
nested replace()).

-- 
http://www.aspfaq.com/
(Reverse address to reply.)
"Shaniqua Jones" <kingOfPop@Neverland.com> wrote in message 
news:%23YD8b2YVEHA.2520@TK2MSFTNGP12.phx.gbl...
> Hi there,
>
>    I'm using a particular field as a basis for forming a URL. For example,
> the field might contain:
>
> A1110541351(LQ#OBJim
>
>    ...which would allow me to build the URL:
>
> <http://hostname/process.aspx?id=A1110541351(LQ#OBJim>
>
>    The problem is that some of those characters in the ID aren't
> URL-friendly. Is there a way to tell SQL to URLEncode the string before
> returning it in the query?
>
> Thanks!
>
> 


Relevant Pages

  • Re: String field length truncated to 255
    ... ado connecting to Microsoft sql server 2000. ... > trying to insert about 825 character string into the new record. ... > characters of data in Sql Query Analysis as I scroll the column to the ... Question is there a good tool to look at the sql server and see what is ...
    (borland.public.delphi.database.ado)
  • Re: spoofing question
    ... > I am not at liberty to do this as I do not have SQL Server. ... The GUID suggestion was merely one way of creating an "unguessable" session ... could randomly generate a string of digits and check your db for uniqueness. ... characters, you would need 38.53 characters to cover the same range of ...
    (microsoft.public.inetserver.asp.general)
  • Re: Problem with large amount of characters in a VBA variant
    ... a SQL Server database via ODBC. ... The string is correctly stored in the Access ... variant VBA variable, but when looking at the variant with the ... I find that it has got only 255 characters (when the ...
    (comp.databases.ms-access)
  • Re: Problem with large amount of characters in a VBA variant
    ... a SQL Server database via ODBC. ... The string is correctly stored in the Access ... variant VBA variable, but when looking at the variant with the ... I find that it has got only 255 characters (when the ...
    (comp.databases.ms-access)
  • Re: Stored proc with version number ?
    ... in addition to letter characters from other languages. ... Certain symbols at the beginning of an identifier have special meaning ... in SQL Server. ... I choose> the existing stored proc uspTableSave and right click Properties. ...
    (microsoft.public.sqlserver.programming)