Home > Net >  Winform database
Winform database

Time:09-22

VS2012 in executing code error, error is found on the Internet, the success of the test database and the following error, please the great god teach

CodePudding user response:

This will open up the SQL Server Browser

CodePudding user response:

The
big watermelon a WuYiJin reference 1 floor? Response:
SQL Server Browser this will open up

SQL Server brow that not only the start

CodePudding user response:

This should be didn't write the SQL server connection parameters, user name, password, etc

CodePudding user response:

reference sooohCom reply: 3/f
this should be didn't write the SQL server connection parameters, user name, password, etc.

Read a few hours, no error code phenomenon, mainly SQL connection

CodePudding user response:

Look at the firewall and port opened?

CodePudding user response:

refer to the second floor three-year-old son reply:
Quote: big watermelon a WuYiJin reference 1 floor? Response:
SQL Server Browser this will open up

SQL Server not only above brow the start

You point on the service attributes change my login account for Windows login account, you don't want to use the opening up of the remote connection way to connect to the database

Or the database connection string to use locally you try below
 
String connectString="server=. The database=database name; Uid=database account; The PWD="password database;

CodePudding user response:

The
big watermelon a WuYiJin reference 6 floor? Response:
Quote: refer to the second floor three-year-old son reply:

The
Quote: big watermelon a WuYiJin reference 1 floor? Response:
SQL Server Browser this will open up

SQL Server not only above brow the start

You point on the service attributes change my login account for Windows login account, you don't want to use the opening up of the remote connection way to connect to the database

Or the database connection string to use locally you try below
 
String connectString="server=. The database=database name; Uid=database account; The PWD="password database;


The way I use is the string num="Server=localhost; The database=informations; Integrated security=true ";

CodePudding user response:

Try to "server=localhost", instead "server=. \ sqlexpress"

CodePudding user response:

Is the setting in the SQL configuration manager did not open, I remember I had a similar,

CodePudding user response:

Database connection string: "data source=(local) \ sqlexpress; The database=informations; User id=user name; Password=password "; String in the parameters of the first to run the program of computer management in the studio to login try; If management studio can login, the program also can login, if you can't login; See if the corresponding service is started; Still can not login, check it again whether to allow remote connections, still can not login, check it again "configuration manager";
  •  Tags:  
  • C#
  • Related