Now you know how, so let me tell you something interesting.
If someone gets hold of your connectionstrin g, they can potentially
access your db (cause your connectionstrin g has the db user name, and
pwd). Remember never to use a literal connection string, it's best to
put it in web config.
If possible use Windows authentication, and you will be safer, cause
you would not have user id and pwd in the connectionstrin g, and nobody
would be able to gain access to the db using those.
Comment