|
|
Sponsor |
Re: Escaping characters in string variables: msg#00075db.firebird.dotnetprovider
Jiten Bhagat wrote: If I have the following string to represent a SQL statement: string s = “SELECT * FROM TABLE_NAME WHERE Description = ‘” + someDescription + “’”; How do I ensure that the someDescription variable has escaped all special characters? Use a parameterized query. So your query would be: "SELECT * FROM TABLE_NAME WHERE DESCRIPTION = ?" Then add a parameter to your command object with the value of the parameter set to the value you wish to search for. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Escaping characters in string variables, Jiri Cincura |
|---|---|
| Next by Date: | Re: Embedded charset issue, Neal Tibrewala |
| Previous by Thread: | Re: Escaping characters in string variables, Jiri Cincura |
| Next by Thread: | Embeded version in .Net 2005, Takis Eliades |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|