一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Microsoft OLE DB Provider for ODBC Drivers

时间:2022-07-02 13:15:35 编辑:袖梨 来源:一聚教程网

示如下:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]用户 'DAA5DDA31197484IUSR_DAA5DDA31197484' 登录失败。
/myasp/111.asp, 第 8 行


我的连接SQL Server数据库代码

<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_yuangongid_STRING
Recordset1.Source = "SELECT * FROM dbo.main ORDER BY id ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>


conn.asp
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_yuangongid_STRING
MM_yuangongid_STRING = "dsn=yuangong;"
%>

 

Recordset1.ActiveConnection = MM_yuangongid_STRING是连接数据库的执行处,
提示说连接数据库失败,用户 'DAA5DDA31197484IUSR_DAA5DDA31197484' 登录失败
你检查下用户名密码什么的是否错误。
另外,要确认你是否安装了mssql哦

热门栏目