CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.faq_frequently_asked_questions Tags:
Item Type: NewsGroup Date Entered: 8/17/2007 9:43:50 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 147 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
sparco87
Asp.Net User
Insert an apostrophe into a sql string8/17/2007 9:43:50 PM

0

Hey I have what I think is a simple question. How would i insert an apostrophe into a sql string without getting an error. Thanks in advance

pkellner
Asp.Net User
Re: Insert an apostrophe into a sql string8/17/2007 9:48:23 PM

0

It's kind of ugly, but this is what I do.

char qq = new char();
            qq = '"';
            StringBuilder sb = new StringBuilder();
            sb.Append("<?xml version=");
            sb.Append(qq);
            sb.Append("1.0");

 

same for sql


Peter Kellner
http://73rdstreet.com and blogging at
http://PeterKellner.net
MVP, ASP.NET
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:




   
  Privacy | Contact Us
All Times Are GMT