Here is something that isn't yet very clear to me. Say, I've got a commutative ring A. I consider the affine scheme from A, so it's a sheaf of rings over Spec A.

**EDIT**: And additionally let's say Spec A is Hausdorff.

Now additionally let's say I know an A-module M and from that I can make a sheave of modules over O_Spec(A), call it M~. All standard stuffs till now. But now I want to have one more information, namely I have an open subset of Spec(A), say U, that is dense in Spec(A). And I know additionally that the stalks M~_x are isomorphic to O_x for all x in U.. Can one conclude that M and A are A-module isomorphic? (if so can one follow the same argument for general schemes with modules over them?) What are the conditions by which one can conclude this?