Database - Best Practices

I am working on a database application and was hoping someone might be willing to give me some advice on what the "best practices" are regarding where to put my database access code:

Should I place the database access code in my Main method, the Load Event of the main form, a seperate method inside my main form, or in a seperate class file

Thanks!