win 7下连接sql问题
代码如下:<!--#include file="ADOVBS.inc"-->
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=SQLoledb;data source=YAO;UID=;PWD=;Initial Catalog=rainbow;Integrated Security=SSPI"
Set bkgd= Server.CreateObject("ADODB.Recordset")
bkgd.open "SELECT * FROM Userinfo WHERE code='"&Session("name1")&"'",conn,AdOpenDynamic,adLockOptimistic
'set conn=server.createobject("adodb.connection")
'conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data/photo.mdb")
%>
可是提示:
Microsoft OLE DB Provider for SQL Server '80040e4d'
用户 'YAO\YAOPENG' 登录失败。
\conn.asp, line 5
请教是什么原因