Let $X$ be a scheme and let $Q$ be an $O_X$-ideal. Let $U = \operatorname{Spec} R$ be an affine open subset. Say $Q(U) = A \subseteq R$. I would like to deduce that for $x \in U$, we have that the stalks at $x$ satisfy $$ Q_x = A O_{\operatorname{Spec}R, x}. $$ Any explanation is appreciated. Thank you!
ps By an $O_X$-ideal it is meant $Q$ is a sheaf of ideals in $O_X$, i.e. $Q$ is a subsheaf of $O_X$ such that for all $U$, $Q(U)$ is an ideal in $O_X(U)$.
Take $X=U=\mathrm{Spec}(A)$ with $A$ a DVR. Then as a set we have $\mathrm{Spec}(A)=\{\eta,s\}$ where $\eta=[(0)]$ and $s=[\mathfrak{m}]$ correspond to the maximal ideal.
Notice that as a topological space $X$ has only three open sets: $\emptyset$, $\{\eta\}$ and $X$. Now consider the following three abelian groups over the open sets of $X$:
With the obvious restriction maps, it is easy to check that $Q$ is actually a sheaf, and moreover, it is an $\mathcal{O}_X$-module. But now you have $$Q_\eta=\lim_{\substack{\longrightarrow \\U \ni \eta}}Q(U)=Q(\eta)=\mathrm{Frac}(A)\neq Q(X)\mathcal{O}_{X,\eta}=0$$
So the result is not true.
In the other hand, if you take $Q$ to be any quasi-coherent $\mathcal{O}_X$-submodule of $\mathcal{O}_X$ it is easy to see that the result is true.
Pd: Usually an ideal sheaf is defined to be a quasi-coherent $\mathcal{O}_X$-submodule of $\mathcal{O}_X$. This is done because you what the bijection between ideal sheafs of $\mathrm{Spec}(A)$ and ideals of $A$ or the bijection between ideal sheafs of $X$ and closed subschemes of $X$ (both are true only with the quasicoherent assumption)