ampersand problem

Results 1 to 2 of 2

Thread: ampersand problem

  1. #1
    Joshua Calvert Guest

    Default ampersand problem

    Hi!<BR><BR>I&#039;m building a simple online database that will hold information on sample cd&#039;s. The tool I&#039;m using is UltraDev 4.0. Script language used is VB.<BR><BR>The database is a MS Access97 mdb file, concisting of two tables, tbl_manufacturers (master table) and tbl_disks(slave table).<BR><BR>The master table primary key is the field that holds the name of the manufacturer. The slave table holds a field for manufacturer as well and these two fields are used to establish the relation.<BR><BR>Everything works perfectly with the asp pages I&#039;ve made so far except for one thing:<BR><BR>If an entry in any of the tables, let&#039;s say the manufacturer field in tbl_manufacturers, holds an ampersand, my asp page will truncate everything up to and inclusing, the ampersand, leaving out the rest of the string. This is not good as the result page will only get half the value sen along in, thus not beeing able to find the corresponding entry in the slave table.<BR><BR>Why is this and how can I circumvent it? Shurely I must be able to use any character I&#039;d like in a text entry in the database and not causing my asp pages to go belly up?<BR><BR>Below is the code snippet that inserts the data into A HREF which the detail page recieves. I&#039;ll post the related functions if someone would be interested in having a further look at them:<BR><BR>&#060;A HREF="asa_dks.asp?&#060;%= MM_keepNone & MM_joinChar(MM_keepNone) & "Manufacturer=" & rset_manuf.Fields.Item("Manufacturer").Value %&#062;"&#062;<BR><BR>regards,<BR><BR>Joshua <BR>

  2. #2
    Join Date
    Dec 1969

    Default Its your string, formatted incorrectly....

    if you are going to do your string this way, it has to be formatted like this:<BR><BR>&#060;a href="blah.asp?varname=&#060;%=variable%&#062;&var name2=&#060;%=variable2%&#062;"&#062;Click here&#060;/a&#062;<BR><BR>Your formatting is off, you will want to URLEncode your variables as well (it replaces the items with %20 and such for spaces and stuff)<BR><BR>--Whol

Posting Permissions

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