ws2812b怎么控制:ASP高手们请进啊 救救我把 高手都来看看

来源:百度文库 编辑:高考问答 时间:2024/04/28 18:05:58
我想做一个权限 使我的网页拥有用户名和密码才可以通过 但是我加上代码就出现了下面的错误:

Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC 驱动程序 管理器] 未发现数据源名称并且未指定默认驱动程序

/sinonews/login.asp,行25

我的代码是:
<%@ Language=VBScript %>
<% Response.Buffer = True %>

<HTML>
<BODY>

<% Session("allow") = True %>

<%
UserName = Request.Form("username")
Password = Request.Form("password")
'grab the form contents

Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "your connection string here"

SQL = "Select * From tblLogin"
Set RS = MyConn.Execute(SQL)

If UserName = RS("UserName") AND Password = RS("Password") Then
'if there is a match then show the page
%>

Put the contents of your page here.

<%
Else
Response.Redirect "http://www.yourdomain.com/login.asp"
RS.Close
MyConn.Close
Set RS = Nothing
Set MyConn = Nothing
End If
%>
'if there was no match then make the visitor try again to login.

</BODY>
</HTML>

把含上述代码的文件命名为login.asp

请高手帮我看一下是哪的问题 或是给我加权限和密码的更好的方法 小弟感激不尽 我的信箱是:chunjinghuo@126.com

MyConn.Open "your connection string here"这你没写啊应该这样

MyConn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=SQL服务器名称或IP地址;UID=sa;PWD=数据库密码;DATABASE=数据库名称"

你自己把中文部分补充一下,还有你下面用的字段必须是数据库中实际存在的