Is it true that if $\mbox{Ext}^{1}(P,M)=0$ for every finitely generated module $M$ then $P$ is projective? Or that if $\mbox{Ext}^{1}(M,Q)=0$ for every finitely generated module $M$ then $Q$ is injective?

4$\begingroup$ For injectives this is just Baer's criterion. The interesting notion where the test modules M are required to be finitely presented yields Q that are called FPinjective or absolutely pure. They are the pure submodules of injective modules, and over Prüfer domains they are the divisible modules. Ext definitely does not commute willnilly with direct limits since Q is a direct limit of Zs, but Ext(Q,Z)=R is not equal to the limit of Ext(Z,Z)=0. $\endgroup$ – Jack Schmidt May 27 '10 at 4:11
For the first question you already have had an answer in Is it true that if $\operatorname{Ext}^{1}_{A}(P,A/I)=0 $ for all $ I$ then $P$ is projective? if $\mathrm{Ext}^1_{\mathbb Z}(P,M)=0$, then it depends on the axioms of settheory whether the conclusion is true or not. The answer to the second question is yes, it is one of the basic characterisation of injective modules that $\mathrm{Ext}^1(A/I,Q)=0$ for all ideals $I$ iff $Q$ is injective. As for the question in your title, the answer should be no for the second variable (irrespective of the axioms of set theory, but I am too lazy to try to come up with an example). For the first variable things are a little bit more interesting: If $M$ is the direct limit of ${M_\alpha}$, then we have a spectral sequence with $E_2$term $lim^i\mathrm{Ext}^j(M_{\alpha},Q)$ ("lim" means inverse limit, there is some strange problem with using "varprojlim" which sometimes works and sometimes doesn't) and converging to $\mathrm{Ext}^{i+j}(M,Q)$. Somewhat strangely this spectral sequence does not seem to formally give the above characterisation of injective modules as there is a potential $lim^1\mathrm{Hom}(M_{\alpha},Q)$ contribution.
A short comment, which I can't post as a comment as I've just opened a new account (I apologize). The $R^1\varprojlim \mathrm{Hom}_R(M_{\alpha}, Q)$ contribution can be taken care by arranging the transition maps in the directed system $(M_{\alpha})$ to be injective.
Suppose we show $\mathrm{Ext}^1_R(\cdot, Q)$ vanishes on all finitely generated $R$modules ($R$ Noetherian: we'll be using that the category of finitely generated $R$modules is abelian when $R$ is Noetherian). We can write $M$ as the directed union of its finitely generated $R$submodules and arrange all transition maps to be injective. Applying $\mathrm{Hom}_R(\cdot, Q)$ to the injection $M_{\alpha}\to M_{\alpha'}$, $\alpha'\ge\alpha$, we have an exactinthemiddle seq
$$\mathrm{Hom}_R(M_{\alpha'}, Q)\to \mathrm{Hom}_R(M_{\alpha}, Q) \to \mathrm{Ext}^1_R(A, Q)$$
for $A$ a finitely generated $R$module. That is, the inverse system $(X_{\alpha})$, $X_{\alpha} := \mathrm{Hom}_R(M_{\alpha}, Q)$, satisfies the MittagLeffler condition (because $\mathrm{Ext}^1_R(A, Q) = 0$) and therefore it has vanishing $R^1\varprojlim (\cdot)$.
Torsten's answer shows that in the case $R$ is Noetherian, one reduces to check injectivity of an $R$module $Q$ to computing $\mathrm{Ext}^1_R(R/\mathfrak{p}, Q)$ to be trivial for all prime ideals of $R$ (as for $M$ finitely generated, given ses's of finitely generated $R$modules:
$$0\to M'\to M\to M''\to 0$$
and by functoriality of Ext's, we get exactinthemiddle sequences
$$\mathrm{Ext}^1_R(M'', Q)\to \mathrm{Ext}^1_R(M, Q)\to \mathrm{Ext}^1_R(M', Q)$$
so if we show vanishing of the outer terms, we show vanishing of the middle one. This reduces consideration to the case of simple $R$modules (again, here $R$ is Noetherian!), ie. of the form $R/\mathfrak{p}$, $\mathfrak{p}$ a prime ideal).
Eg. Let $R = \mathbf{Z}/p^2\mathbf{Z}$. Showing $R$ is an injective $R$module is equivalent to showing $\mathrm{Ext}^1_R(R/p, R) = 0$. More in general, can show $\mathbf{Z}/n\mathbf{Z}$ is injective as a module over itself this way.
Best
The answer to the first question is positive, if $P$ is itself finitely generated. Indeed, then $P$ is a direct summand of a free module, hence projective. In general, $Hom(P,)$ does not commute with colimits. Moreover, it commutes only if $P$ is compact (this is the definition of compactness), so I don't think that in general such $P$ will be projective.

1$\begingroup$ Are you sure you don't need the ring to be Noetherian? $\endgroup$ – ashpool May 27 '10 at 21:51

1$\begingroup$ Of course, I assumed that the ring is Noetherian. Otherwise it is very strange to consider the subcategory of finitely generated modules. $\endgroup$ – Sasha May 28 '10 at 3:48