How can create commonly "Connectionstring"?
Hi,
I'm complete my Windows Form Application project. So, I need to make the setup file(.exe) now. Then, before do it how can create "ConnectionString" commonly. Because, it's install many pc's. So, please help me to create the connectionstring correctly.
sampath tharangaPosted Mar 30, 2020, 10:49 AM
(01) Project directory create a database.
(02) SQL Server (Express)/SQLLocalDB location create a database.
These two are the have some problems. How create connectionstring to these two ways.
(01) connectionString = "Data Source=(LocalDB)\MSSQLLocalDB; AttachDbFile=|DataDirctory|\myDatabase.mdf; Integrated Security =True;
(02) connectionString = "Server=.\SQLEXPRESS;Database = my_app_db; User Id = sa; Password = abc123; MultipleActiveResultSets = True"
And used ODBC conector.
So, This is my mind drawing methods. So, I have some problems in these two methods.
List of problems:
(01) here is not a problem. But, need to know this is the best way to do it.If not please tell me what are the best one.
(02) Here have many problems. When we are install SQL Server Express then what are the default user id and password. Also, what are the Default instance. If "sa" is default user id, then what are the sa password?. Also, I'm using "ODBC Connection" method to connect database to windows form application. Is it best way? If not, what are the best way. Please help me to solving these problems. Thank you
Viswanatha SwamyPosted Mar 30, 2020, 10:12 AM