Problems encountered during installation of Microsoft SQL Server Desktop Engine (2)

Source: Internet
Author: User
I have no class this afternoon and I am playing with my computer again. I think of the problem that I did not solve yesterday. I feel a little uncomfortable. I have to solve the problem. ^_^.

I uninstalled the study instance installed yesterday and carefully studied the README file. According to the instructions in the file, I created a new file named MSDELog in the C root directory. log file, and then type "Setup SAPWD = chengbo/L * v C:/MSDELog. log SECURITYMODE = SQL "after the installation is complete, it is found that the installation is successful at the end of the log file, so you should just do it. Go to start-> Administrative Tools-> Services and start MSSQLSERVER. After restarting the computer, you will find the SQL Server Service Manager icon in the lower right corner. Green indicates that it is running.

The installation was successful, but there was no Northwind database. I searched the internet and found a solution on MSDN. After extracting the solution, I got three files: northwind. SQL #pubs. SQL #sampdbinstall.exe. Double-click sampdbinstall.exe and set "OK" in the TextBox after the Server to start installation. Open VS. Net and find the installed Northwind and pubs databases in SQL Server in the Server resource manager. Now, test whether the database is normal. Create a new WebForm and use the following code to change the Page_Load method in the cs file:

Private void Page_Load (object sender, System. EventArgs e)

{

SqlConnection Conn = New SqlConnection ("Server = (local); uid = sa; pwd = chengbo; Connection Timeout = 5; database = northwind ;");

Try

{

Sqldataadapter da = new sqldataadapter ("select firstname, lastname from employees ", Conn );

Dataset DS = new dataset ();

Da. Fill (DS );

Datagrid1.datasource = Ds;

Datagrid1.databind ();

}

Catch (exception ex)

{

Response. Write (ex. tostring ());

}

}

 

Press F5 and start the browser. The following table is displayed:

 

 

FirstName

LastName

Nancy

Davolio

Andrew

Fuller

Janet

Leverling

Margaret

Peaco CK

Steven

Buchanan

Michael

Suyama

Robert

King

Laura

Callahan

Anne

Dodsworth

 

Everything works! I hope this article will be helpful to anyone who has encountered the same problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.