Dim SQLConnectionString As String = "Data Source=Computech-PC\SQLEXPRESS;Initial Catalog=Master;User ID=Administrator;Password=Admin", providerName1 = "System.Data.SqlClient"
1 Answer
You missed an important part in your connection string "Trusted_Connection=True" it will resolve your issue for "login failed" take a look at this thread Here, and i will suggest you a good connection string to use on your local machine and it will also help you if you want to deploy your application on another PCs
connectionString ="Data Source=computech-PC\SQLEXPRESS,1433;Network Library=DBMSSOCN;Initial Catalog=Master;Persist Security Info=True;User ID=admin;Password=password;Trusted_Connection=True;".
But you must take care about few things.....
1- Enabling Mixed Mode Authentication from Here
2- you must make an user on your SQL server that has a db_owner from Here and Here
3- configure firewall from Here and Here
4- You must review Here if you faced a problem "login failed"
5- an important hint about "login failed" from Hilary Cotter in msdn forum Here
and Finally you must see this magnificent thread deploy application with sql server database
I hope it helps...
providerName1 = "System.Data.SqlClient"that implies you are attempting to use the .Net Sql Server data provider. Also, your code fragment itself is not a valid string declaration. Show more of your code so that we can determine the context of what you are attempting.