Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Apostrophie Problem

Re: Apostrophie Problem

From: Stephan Born <stephan.born_at_beusen.de>
Date: Thu, 18 Jan 2001 08:49:57 +0100
Message-ID: <3A66A025.5240A2E2@beusen.de>

Perry Hemmings wrote:
>
> Hello All
>
> I am running Oracle 8 with a Visual Basic frontend, my program falls over
> when an Apostrophe is in the name i.e. O'Brien and my search needs adjusting
> can anyone advise me on how to achieve this??
>
> Res = "SELECT Lastname FROM Customer WHERE Lastname = txtTEXTBOX"

I don't know if that works in VB....but why not:

you have to use 'bind-variables'

it will work similar like this

Stmt = "SELECT Lastname FROM Customer WHERE Lastname = :the_name"

where :the_name is the bind-variable (notice the colon in front of the variable)

Now you can bind a valye to the bind-variable. The value now can also contain
an apostrophe.

For further information on that topic read your manual.

Regards, Stephan Received on Thu Jan 18 2001 - 01:49:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US