result r = E_FAILURE;
bool nextRowPresent = false;
int count = 0;
+ String tempURL = Url;
+ tempURL.Replace(L"'", L"''");
query.Append(L"SELECT COUNT(ID) FROM ");
query.Append(bookmarkTable);
query.Append(" WHERE ADDRESS = '");
- query.Append(Url);
- if(Url.EndsWith(L"/"))
+ query.Append(tempURL);
+ if(tempURL.EndsWith(L"/"))
{
query.Append("' OR ADDRESS = '");
String newUrl = L"";
- Url.SubString(0,Url.GetLength()-1 ,newUrl);
+ tempURL.SubString(0,tempURL.GetLength()-1 ,newUrl);
query.Append(newUrl);
}
else
{
query.Append("' OR ADDRESS = '");
- String newUrl = Url;
+ String newUrl = tempURL;
// Url.SubString(0,Url.GetLength()-1 ,newUrl);
newUrl.Append(L"/");
query.Append(newUrl);
{
exist = true ;
}
-
+ tempURL.Replace(L"''",L"'");
CATCH: return r;
}