Can you have a miscarriage if you have pains in your stomach in your first month of pregnancy?

Pain that is heavy cramping and accompanied by bloody discharge or bleeding like having a period could indicate a miscarriage. It is difficult to tell that early in a pregnancy unless you have a doctor's exam.