I had this problem myself and I fixed it by going to the Microsoft SQL Server management studio and manually connecting the database to the user account you login into the database with.
To do this:
- Open Microsoft SQL Server management studio and connect to your server.
- Go to login, right click on the correct user, and go to properties.
- On the top left there's a panel (titled "select a page"). Go to User mapping.
- On the table displayed, where it says user (second column), type in the name of the user next to the database you are using.
While you are at it, look at the panel at the bottom. Where it says Database role membership for:{database name}
, make sure you have db_datareader
and db_datawriter
checked.