Freddy, I see you're working with quoting. You might want to have a look at dbsafestr(). I thought I'd mention it in case you didn't know about it. Regards, --jkl