SQL SELECT, DataSet Table Select, and Apostrophes...

Gladimir

Well-known member
Joined
Mar 29, 2003
Messages
60
Location
San Diego, CA
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_AttorneysBriefcaseCaliforniaEvidence

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

AttorneysBriefcaseCaliforniaEvidence

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

How is this situation typically handled?
 
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 = "youve got it!";
temp = temp.Replace("","");
 
Back
Top