Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Special characters

Reply
Thread Tools

Special characters

 
 
Excel User
Guest
Posts: n/a
 
      09-15-2009
Hi,

I have a field that contains special characters (', % etc) the ' causes
problems because it messes up the SQL insert/update command, what is the
best way to deal with this, I tried encode but then the entry in the DB is
not correct?

Thanks for any advice.

 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      09-15-2009
Excel User wrote:
> Hi,
>
> I have a field that contains special characters (', % etc) the '
> causes problems because it messes up the SQL insert/update command,
> what is the best way to deal with this, I tried encode but then the
> entry in the DB is not correct?
>
> Thanks for any advice.


Use parameters. See:
http://groups-beta.google.com/group/...e36562fee7804e

Personally, I prefer using stored procedures, or saved parameter queries
as they are known in Access:

Access:
http://www.google.com/groups?hl=en&l...TNGP12.phx.gbl

http://groups.google.com/groups?hl=e...tngp13.phx.gbl

SQL Server:
http://groups.google.com/group/micro...09dc1701?hl=en



--
HTH,
Bob Barrows


 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      09-22-2009
You double them.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)


"Excel User" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> I have a field that contains special characters (', % etc) the ' causes
> problems because it messes up the SQL insert/update command, what is the
> best way to deal with this, I tried encode but then the entry in the DB is
> not correct?
>
> Thanks for any advice.



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Counting utf-8 characters -special characters majna Javascript 4 09-19-2007 01:53 PM
Remove only special characters and junk characters from a file rvino Perl 0 08-14-2007 07:23 AM
Re: Meta-Characters, Special Characters xah@xahlee.org Java 2 05-31-2007 09:25 AM
How to convert HTML special characters to the real characters with a Java script Stefan Mueller HTML 3 07-23-2006 10:09 PM
Special editions and Deluxe special edition dvd question. Rclrk43 DVD Video 8 12-29-2004 07:32 PM



Advertisments