Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I pull a string from one table and look for a matching string in another table.

 

In this case, the string I pull from the first table is:

 

G_App_Attorney'sBriefcaseCaliforniaEvidence

 

I strip the first 6 chars from the string (G_App_) and search for the matching string:

 

Attorney'sBriefcaseCaliforniaEvidence

 

If I strip the apostrophe from the first string, then it will not match the second string.

 

How is this situation typically handled?

Never ascribe to malice that which is adequately explained by incompetence. - Napoleon Bonaparte
Posted

Replace

 

Hi,

 

If you want to use aposthrope in your sql statement then you have to replace each aposthrope with double aposthropes

 

example

 

string temp = "you've got it!";

temp = temp.Replace("'","''");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...