Using SQL Server and MSDE in ASP

Source: Internet
Author: User
Tags ini microsoft sql server ole
The author of the February Microsoft Community Star Microsoft Community Star
Microsoft SQL Server is a kind of database server software commonly used in Windows environment, and it is also one of the database used frequently in ASP application. This article focuses on some of the techniques used by SQL Server in conjunction with ASP.
Access and installation of SQL Server
For a commercial application, it is recommended that you purchase a standard or Enterprise version of SQL Server with a price of more than 20,000 (more expensive than Windows) and, if you are learning to use it, or if you have limited financial resources, you can use the desktop version of--MSDE. It is currently available in the. NET Framework SDK, asp.net Web Matrix, Office XP Professional, Developer, Project Server 2002, development tools, and Server-class software. In addition, the SQL Server SP3 provided in the Microsoft site also contains MSDE, or SP3 version. Because it is a simplified version, MSDE does not provide graphical management tools.
Because SQL Server is a wizard installation, this is no longer the place to repeat. One thing to note is that the SQL and Windows integrated Hybrid authentication method should be selected for installation. For a database server that is already installed, you can modify it in the Security page of its Properties window.
MSDE SP3 can be downloaded at http://www.microsoft.com/china/sql/downloads/sp3.asp. Select the language on the right side of the page and click the "Go" button to enter the download page. The Chinese simplified file name is Chs_sql2kdesksp3.exe, the size is 73735 KB. Run this file to extract the installer to a folder. Because we need MSDE to work in the SQL authentication mode, and the SP3 version requires that the SA password not be blank, the Setup.ini file needs to be modified, and the following two lines are added in the Option section:
Securitymode=sql
sapwd= Admin Password
Then execute setup/i setupsqlrun01.msi/settings Setup.ini under DOS. When installed, the startup group of the Start menu adds a service Manager icon. This installation is complete. You can start the database server by restarting the computer or by running Service Manager.
Ii. use of databases in ASP
When you connect to SQL Server in ASP, there are often 80004005 errors. This is because the database server is set to Windows Integrated authentication mode, and the account used by the ASP defaults is blocked from accessing the database. The solution is to set the database server to a mixed authentication mode, allowing it to log in to the database by user name and password.
Writing an OLE DB string is another problem that bothers many people. In fact, the method is very simple. For example, to connect to SQL Server:
1. Create a file with a name extension of UDL and open
2. Select Microsoft OLE DB Provider for SQL Server on the provider page, and then go back to the Connections page, enter the address of the database server, and select "Use specified user name and password", enter the username and password for the connection database, and then in the Select the database on the Server Drop-down box to select or enter the name of the database you want to use. Finally, you can click the "Test Connection" button to test whether the parameters are correct. Note You cannot select "Use WindowsNT Integrated security settings", or you cannot use it in an ASP even if the test succeeds.
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.