Click to See Complete Forum and Search --> : Sql query for Delete a record where the comparision value is a text filed


shanuragu
07-04-2003, 08:35 AM
Hi

I have a country list in the db, no numeric id for all country value. I am successfully deleting records by using the following code.

Set RsDelete = server.createobject("adodb.recordset")
sqlstr = "Delete from country Where country='"&cname&"'"
RsDelete.open sqlstr,conn,adlockoptimistic,adcmdtable

Where country is a text field in the db.

But When I try to delete Countries with names like the following..

1. American Samoa,
2. Papua New Guinea,
3. Lao People's Republic

Deleting is not taking place.

How can I solve this problem???

ShaRa

shanuragu
07-04-2003, 11:27 AM
Yes, as u said for Lao People's Republic I got an error message, but for American Samoa , delete just did't take palce.

Any other method to get through this problem.

ShaRa