ASP connection MSSQL error: Access Denied _ MySQL

Source: Internet
Author: User
ASP connection MSSQL error: Access Denied in an ASP program cannot connect to MSSQL normally. the error message is as follows:

HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Sun, 11 Jun 2006 00:59:27 GMT Connection: close Content-Length: 65 Content-Type: text/html Cache-control: private
HTTP/1.1 401 error: Access Denied.

Program Source File:

<%
Dim SqlLocalName, SqlUsername, SqlPassword, SqlDatabaseName, Conn, ConnStr, db, Err_OpenDatabase
SqlLocalName = "(local)" 'connection IP address [local IP address used outside China]
SqlUsername = "sa" 'user name
SqlPassword = "zhengque" 'user password
SqlDatabaseName = "vnut" 'database name
Set conn = Server. CreateObject ("ADODB. Connection ")
Connstr = "Provider = Sqloledb; User ID =" & SqlUsername & "; Password =" & SqlPassword & "; Initial Catalog =" & SqlDatabaseName &"; data Source = "& SqlLocalName &";"
Conn. Open connstr
Sub CloseConn ()
On Error Resume Next
Conn. close
Set Conn = nothing
End sub
%>

The reason is:

Or
Your sa password is incorrect.
Otherwise, your mysql instance is not started.

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.