crmpicco
08-09-2005, 01:06 PM
set rscountrycode = con.execute("select CountryCode from dbo_tp_countryname where CountryName like '%" & country & "%'")
the variable country sometimes has a apostrophe ( ' ) in it, however, when it does it knocks out my MySQL statement and crashes my DB.
Although, i need to have this apostophe in my statement as when i am searching for CountryName of 'Korea (Democratic People's Republic Of)' then it will not return any records due to the apostrophe.
Other than removing all apostrophies from the DB, which i have posted another related question to in the MySQL forum, how can I get around this????
TIA.
Picco
the variable country sometimes has a apostrophe ( ' ) in it, however, when it does it knocks out my MySQL statement and crashes my DB.
Although, i need to have this apostophe in my statement as when i am searching for CountryName of 'Korea (Democratic People's Republic Of)' then it will not return any records due to the apostrophe.
Other than removing all apostrophies from the DB, which i have posted another related question to in the MySQL forum, how can I get around this????
TIA.
Picco