The laws differ from state to state but generally speaking, the courts will assume that a child born during a marriage is a product of the marriage unless there is evidence to the contrary.  That can be a DNA test or in some states an affidavit of non-paternity will suffice.  However, here is the problem: the courts ant to insure that the child is supported properly in the event of a divorce.  So while an affidavit of non-paternity helps, an affidavit from the father accepting paternity is best for you in the absence of a DNA test.  Please get help from an attorney of your area in the matter.  Good luck.