Skip to main content
Participating Frequently
February 20, 2008
Question

Search results where there is an "&" in the text

  • February 20, 2008
  • 8 replies
  • 536 views
I am using DW MX and Access, and put together a search page that looks up company names in the database table.

A proportion of the company names have an "&" in their name and these create BOF / EOF errors.

how do I create a recordset that accepts the & as a legitimate part of the text.

All help is appreciated - at the moment I am removing all of the &'s from the database.

thanks,
This topic has been closed for replies.

8 replies

Inspiring
February 21, 2008
Heh. I was tired....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:n1frr31fi6kmv3il1p31k5e1ajbsh7lcrg@4ax.com...
> .oO(Murray *ACE*)
>
>>Replace all instances of "&" in the database with "&".
>
> Bad idea. _Really_ bad idea. Data in a database should always be stored
> in a raw format without any special encoding or masking. The encoding
> takes place when you use the data, for example when you print it out.
> And _only_ then.
>
> OK, Access is not a database ... SCNR ;)
>
> Micha

Inspiring
February 21, 2008
.oO(Murray *ACE*)

>Replace all instances of "&" in the database with "&".

Bad idea. _Really_ bad idea. Data in a database should always be stored
in a raw format without any special encoding or masking. The encoding
takes place when you use the data, for example when you print it out.
And _only_ then.

OK, Access is not a database ... SCNR ;)

Micha
Inspiring
February 21, 2008
Chris Morgan wrote:
> I am using DW MX and Access, and put together a search page that looks up
> company names in the database table.
>
> A proportion of the company names have an "&" in their name and these create
> BOF / EOF errors.
>
> how do I create a recordset that accepts the & as a legitimate part of the
> text.
>
> All help is appreciated - at the moment I am removing all of the &'s from the
> database.
>
> thanks,
>

You may need to use Server.URLEncode to turn your & sign into &amp when
you pass the data into the database. See if this makes any sense:
http://www.4guysfromrolla.com/webtech/042601-1.shtml or
http://www.aspnut.com/reference/encoding.asp
Inspiring
February 20, 2008
I suppose that could be it.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Dooza" <doozadooza@gmail.com> wrote in message
news:fphmtp$p7i$3@forums.macromedia.com...
> Murray *ACE* wrote:
>> Replace all instances of "&" in the database with "&".
>>
>
> Could it not be the way he is sending the search term to the search
> results page? If its not URLEncoded and he is using QueryString then it
> will think there is another parameter being passed to the page.
>
> Steve

Inspiring
February 20, 2008
Murray *ACE* wrote:
> Replace all instances of "&" in the database with "&".
>

Could it not be the way he is sending the search term to the search
results page? If its not URLEncoded and he is using QueryString then it
will think there is another parameter being passed to the page.

Steve
Inspiring
February 20, 2008
Replace all instances of "&" in the database with "&".

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Chris Morgan" <webforumsuser@macromedia.com> wrote in message
news:fph3ei$52n$1@forums.macromedia.com...
> thanks,
>
> not sure I understand, it is the database entry that has an "&" e.g. "John
> Smith & Sons Limited".
>
> if the database entry is "John Smith and Sons Limited", there is no
> problem.

Participating Frequently
February 20, 2008
thanks,

not sure I understand, it is the database entry that has an "&" e.g. "John Smith & Sons Limited".

if the database entry is "John Smith and Sons Limited", there is no problem.
Inspiring
February 20, 2008
REplace it with the HTML entity - '&'.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Chris Morgan" <webforumsuser@macromedia.com> wrote in message
news:fph2gm$48i$1@forums.macromedia.com...
>I am using DW MX and Access, and put together a search page that looks up
> company names in the database table.
>
> A proportion of the company names have an "&" in their name and these
> create
> BOF / EOF errors.
>
> how do I create a recordset that accepts the & as a legitimate part of the
> text.
>
> All help is appreciated - at the moment I am removing all of the &'s from
> the
> database.
>
> thanks,
>