PC Review


Reply
Thread Tools Rate Thread

Apostraphe Problem

 
 
=?Utf-8?B?cmljbw==?=
Guest
Posts: n/a
 
      23rd Mar 2007
Hi All,

I'm having problems when my users enter data with an apostraphe, i use a lot
of un bound forms so input alot of data using code. When a user inputs for
example "David O'Keith" they get an error, when the form attempts to save the
record.

So far i have only found functions to strip the apostraphe, this is not
preferable.

Any ideas.

TIA

Rico
 
Reply With Quote
 
 
 
 
Rick B
Guest
Posts: n/a
 
      23rd Mar 2007
What is the error?

What type of field is this being saved in?

Is there any code running that might affect this?

--
Rick B



"rico" <(E-Mail Removed)> wrote in message
news:5948A253-3969-4243-8C97-(E-Mail Removed)...
> Hi All,
>
> I'm having problems when my users enter data with an apostraphe, i use a
> lot
> of un bound forms so input alot of data using code. When a user inputs for
> example "David O'Keith" they get an error, when the form attempts to save
> the
> record.
>
> So far i have only found functions to strip the apostraphe, this is not
> preferable.
>
> Any ideas.
>
> TIA
>
> Rico



 
Reply With Quote
 
ChrisHulan
Guest
Posts: n/a
 
      23rd Mar 2007
On Mar 23, 10:12 am, rico <r...@discussions.microsoft.com> wrote:
> Hi All,
>
> I'm having problems when my users enter data with an apostraphe, i use a lot
> of un bound forms so input alot of data using code. When a user inputs for
> example "David O'Keith" they get an error, when the form attempts to save the
> record.
>
> So far i have only found functions to strip the apostraphe, this is not
> preferable.
>
> Any ideas.
>
> TIA
>
> Rico


You need to check the user's input for apostrophes, and replace each
single with two apostrophes:
Input: "David O'Keith"
Escaped apostrophe: "David O''Keith"

Thats two apostrophes between O and K, not a double-quote

Cheers


 
Reply With Quote
 
Rick B
Guest
Posts: n/a
 
      23rd Mar 2007
Why would you need to do that? I just went into one of my databases and
entered a name with an apostrophe and it worked just fine. I think the
submitter is saying that the users are simply entering a record from a form
and they are getting an error if the entry contains an apostrophe.

--
Rick B



"ChrisHulan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Mar 23, 10:12 am, rico <r...@discussions.microsoft.com> wrote:
>> Hi All,
>>
>> I'm having problems when my users enter data with an apostraphe, i use a
>> lot
>> of un bound forms so input alot of data using code. When a user inputs
>> for
>> example "David O'Keith" they get an error, when the form attempts to save
>> the
>> record.
>>
>> So far i have only found functions to strip the apostraphe, this is not
>> preferable.
>>
>> Any ideas.
>>
>> TIA
>>
>> Rico

>
> You need to check the user's input for apostrophes, and replace each
> single with two apostrophes:
> Input: "David O'Keith"
> Escaped apostrophe: "David O''Keith"
>
> Thats two apostrophes between O and K, not a double-quote
>
> Cheers
>
>



 
Reply With Quote
 
ChrisHulan
Guest
Posts: n/a
 
      23rd Mar 2007
On Mar 23, 11:57 am, "Rick B" <Anonymous> wrote:
> Why would you need to do that? I just went into one of my databases and
> entered a name with an apostrophe and it worked just fine. I think the
> submitter is saying that the users are simply entering a record from a form
> and they are getting an error if the entry contains an apostrophe.
>
> --
> Rick B
>
> "ChrisHulan" <chris.hu...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> > On Mar 23, 10:12 am, rico <r...@discussions.microsoft.com> wrote:
> >> Hi All,

>
> >> I'm having problems when my users enter data with an apostraphe, i use a
> >> lot
> >> of un bound forms so input alot of data using code. When a user inputs
> >> for
> >> example "David O'Keith" they get an error, when the form attempts to save
> >> the
> >> record.

>
> >> So far i have only found functions to strip the apostraphe, this is not
> >> preferable.

>
> >> Any ideas.

>
> >> TIA

>
> >> Rico

>
> > You need to check the user's input for apostrophes, and replace each
> > single with two apostrophes:
> > Input: "David O'Keith"
> > Escaped apostrophe: "David O''Keith"

>
> > Thats two apostrophes between O and K, not a double-quote

>
> > Cheers


The OP mentioned the forms are unbound so I am guessing he is
manipulating the data somehow and then updating his DB
If he is building the insert DML and the quotes are not properly
escaped he will get errors

Cheers

 
Reply With Quote
 
Rick B
Guest
Posts: n/a
 
      23rd Mar 2007
ahhhh. Good point.

:-)


--
Rick B



"ChrisHulan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Mar 23, 11:57 am, "Rick B" <Anonymous> wrote:
>> Why would you need to do that? I just went into one of my databases and
>> entered a name with an apostrophe and it worked just fine. I think the
>> submitter is saying that the users are simply entering a record from a
>> form
>> and they are getting an error if the entry contains an apostrophe.
>>
>> --
>> Rick B
>>
>> "ChrisHulan" <chris.hu...@gmail.com> wrote in message
>>
>> news:(E-Mail Removed)...
>>
>> > On Mar 23, 10:12 am, rico <r...@discussions.microsoft.com> wrote:
>> >> Hi All,

>>
>> >> I'm having problems when my users enter data with an apostraphe, i use
>> >> a
>> >> lot
>> >> of un bound forms so input alot of data using code. When a user inputs
>> >> for
>> >> example "David O'Keith" they get an error, when the form attempts to
>> >> save
>> >> the
>> >> record.

>>
>> >> So far i have only found functions to strip the apostraphe, this is
>> >> not
>> >> preferable.

>>
>> >> Any ideas.

>>
>> >> TIA

>>
>> >> Rico

>>
>> > You need to check the user's input for apostrophes, and replace each
>> > single with two apostrophes:
>> > Input: "David O'Keith"
>> > Escaped apostrophe: "David O''Keith"

>>
>> > Thats two apostrophes between O and K, not a double-quote

>>
>> > Cheers

>
> The OP mentioned the forms are unbound so I am guessing he is
> manipulating the data somehow and then updating his DB
> If he is building the insert DML and the quotes are not properly
> escaped he will get errors
>
> Cheers
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem after problem after problem - winXP wont start! =?Utf-8?B?TWF2aXJpY2s=?= Windows XP Help 2 23rd Apr 2006 02:55 PM
apostraphe to Hungarian =?Utf-8?B?SnVsaXVzIChHeXVsYSk=?= Microsoft Word Document Management 1 2nd Apr 2006 06:12 PM
Identifying numbers formatted as text or apostraphe jas0n Microsoft Excel Discussion 3 10th May 2005 11:45 AM
Re: apostraphe problem in SQL using DLookup Function Nikos Yannacopoulos Microsoft Access VBA Modules 3 19th Apr 2005 06:02 PM
hibernation problem! problem!, Power Option problem! Farzad Hayati Microsoft Windows 2000 Hardware 2 5th Feb 2004 10:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:57 PM.