Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Feb 20, 2008 Feb 20, 2008
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,
TOPICS
Server side applications
537
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2008 Feb 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,
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 20, 2008 Feb 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2008 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2008 Feb 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2008 Feb 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2008 Feb 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2008 Feb 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2008 Feb 21, 2008
LATEST
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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines