Problems with URLEncode

Results 1 to 2 of 2

Thread: Problems with URLEncode

  1. #1
    Join Date
    Dec 1969

    Default Problems with URLEncode

    Hi there,<BR><BR>I have written an ASP page which, most of the time, retrieves database records and sends them to a Flash movie. In order for this to work properly, the data needs to be URL encoded which so far I have been doing using Server.URLEncode("... ").<BR><BR>Unfortunately, sometimes I have been getting the following error -<BR><BR>Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch: &#039URLEncode&#039 <BR><BR>/boxer3/mainSearch.asp, line 52<BR><BR>Can anybody tell me why this is occuring and how do I sort it out? Help would be much appreciated.<BR><BR>Yours, Ian. <BR><BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Problems with URLEncode

    URLEncode is expecting a string argument, and possibly the datatype you are extracting from the database doesn&#039t "want" to be converted to a string.<BR><BR>You could try<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Server.URLEnc ode( "" & whatever )<BR>to force it to be concatenated to a string and thus guarantee a string result (albeit the result might be simply "").<BR><BR>But the best thing is probably to do a <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write "&#060;HR&#062;" & whatever & "&#060;HR&#062;" & vbCRLF<BR>to see exactly what it is that the system is balking at. You might find, for example, that you are trying to URLEncode a null, which won&#039t work.

Posting Permissions

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