it sounds like a bug in your code, can you produce a small working sample that displays this.
all it would do is exactly as you have described in your description. The bit about it working later does not need to be shown, as we don't need to see the working code.
Joined: Jul 29, 2010
Sir i have marked the status as solved
the database was new to me and their was some trigger which was not letting me doing this and i was not aware of this.