データベース接続を修正するには? あるサーバーから別のサーバーに Web サイトを移動しています。
これは、接続ファイルにあるものです。
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_**_STRING
MM_**_STRING = "Driver={SQL Server};Server=localhost;Database=mssql0_***_1;Uid=mssql0_***_1;Pwd=********;"
%>
そして、これはaspファイルです:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include virtual="/Connections/**.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername = CStr(Request.Form("userName"))
If MM_valUsername <> "" Then
Dim MM_fldUserAuthorization
Dim MM_redirectLoginSuccess
Dim MM_redirectLoginFailed
Dim MM_loginSQL
Dim MM_rsUser
Dim MM_rsUser_cmd
MM_fldUserAuthorization = "userAccess"
MM_redirectLoginSuccess = "/welcome.asp"
MM_redirectLoginFailed = "/index.asp?error=Incorrect+Login,+Please+try+again"
MM_loginSQL = "SELECT userName, userPassword, userFirstName"
If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization
MM_loginSQL = MM_loginSQL & " FROM users WHERE userName = ? AND userPassword = ?"
Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command")
MM_rsUser_cmd.ActiveConnection = MM_**_STRING
MM_rsUser_cmd.CommandText = MM_loginSQL
24 行目に「80004005」というエラーが表示されます。何が問題なのですか? データベース接続の問題ですか?