Is the role of this code, please create the database and set the ID and password? If I want to turn this into an open Source project in the future, the Data Source or localhost \ LOCALDB?
The trouble great god explain it in detail, thank you.
CodePudding user response:
The role of this code is to find the address of the database, and then enter account password, whether or not you want to be open source project has nothing to do with thisCodePudding user response:
Generally in the connection string to the configuration file, so that the user to changeCodePudding user response:
Data Source is the server pathInitial Catalog is a database
User ID=DBUser; Password=Memadin2019
This is the user name password
This does not create the database function
CREATE a database using the CREATE TABLE
CodePudding user response:
Which is Data Source database address, IP, local general use localhost \ LOCALDB, also can use 127.0.0.1, or computer IPCodePudding user response:
Database connection string, it is a database connection string,Novice, learn, ado.net,
CodePudding user response:
1, in fact most, don't write, so generally write like this:DBConfig. DbConnection="Server=127.0.0.1; Uid=sa; The PWD=sa; The Database=mydataBase1 "; So just write the
2, database operations, try not to write their own, have a ready-made auxiliary class, very perfect DbHelperSQL, for example, the people common categories:
CodePudding user response:
Data Source=localhost \ LOCALDB; Initial Catalog=MemDB; User ID=DBUser; Password=Memadin2019This is the database connection string, is a must, his writing has a lot of kinds such as
Localhost \ LOCALDB==127.0.0.1 \ LOCALDB
CodePudding user response:
Database is a multi-user system, then must need to have a login, you consider is password leaked, then use random password bai, along with a variety of access restrictions, waiting for you to do the real project will seeCodePudding user response:
Just began to learn, is scheduled to open source, goals can be.CodePudding user response:
The meaning of this code is needed to connect to the database, and connect to the database configuration parametersCodePudding user response:
You can have a look at Ado.net for theYou name is in SQLhelp cs, connect to the database name server IP is connect to the database, how to configure the local words can baidu, the database is the database name, the rest is the account password,