SQL Server does not exist or is denied access to the relevant solutions found on the Internet:
(A) 1: If you access the Internet independently, open port 21. enable port 1433 on the LAN.
2. Disable the firewall!
(B) Change sqllocalname = "(local)" of the database connection to an IP address. You can change (local) to 127.0.0.1 or an Internet IP address.
(C) Open the service, stop full-text retrieval and SQL Server services, enable SQL Server, and then enable full-text retrieval.
(D) Right-click SQL Server properties ==> the "ownership link:" allow cross-database ownership link "option must be checked (this operation requires restarting SQL Server ).
I tried the above method and it didn't play a role. Finally, I downloaded the SQL SP3 patch on Microsoft's website and installed it. Then I can install and run it normally.
Try to connect to the database in the following form
'SQL database connection parameters: Database Name (sqldatabasename), user password (sqlpassword), user name (sqlusername ),
'Connection name (sqllocalname) (local and foreign IP addresses)
Const sqldatabasename = "gym"
Const sqlpassword = "test"
Const sqlusername = "sa"
Const sqllocalname = "(local )"
Connstr = "provider = sqloledb; user id =" & sqlusername & "; Password =" & sqlpassword & "; initial catalog =" & sqldatabasename &"; data Source = "& sqllocalname &";"
On Error resume next
Set conn = server. Createobject ("ADODB. Connection ")
Conn. Open connstr
If err then
Err. Clear
Set conn = nothing
Response. Write "database connection error. Check the connection string. "
Response. End
End if
Important work of Intranet ing:
Sqlserver server --> Start Menu --> sqlserver --> server network utility --> enable Winsock Proxy --> proxy address: (sqlserver Server IP address) --> proxy port --> 1433 --> OK
Connect with an IP address
Key Points
1. Force port, do not use dynamic
2. Add a proxy