you should make sure the SQL Server is configured for mixed mode authentication with both windows and sql users. Probably from sql management studio you are using windows credentials, try connecting sql management using the same sql user credentials as you have in the connection string and see what happens.
Hope it helps,
Joe