I guess your code is written well, most probably the problem is from the database end. Generally this type of error occurs in the following conditions
1. Your username, password is wrong.
2. You don't have proper access to the database, ask from the database administrator or try creating a user with full access.
3. Try the setting of database connectivity, may be your database setting doesn't allow Sql Authentication, it allows only Windows authentication or vice-versa.
4. If not, there might be little problem in the connection string, try this website http://www.connectionstrings.com/ or http://www.sqlstrings.com/ for connection strings.
Hope this will help.
Thanks
Pokuri31, please login to Mark As Answer, if this helps |
Alert Moderator