主题:  请教高手

lixiangwei

职务:普通成员
等级:1
金币:0.0
发贴:57
#12002/12/20 11:50:41
<%@LANGUAGE="VBSCRIPT" %>

<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_username_STRING
Recordset1.Source = "SELECT * FROM test"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>



无标题文档




<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>





<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
<%=(Recordset1.Fields.Item("id").value)%>
<%=(Recordset1.Fields.Item("name").value)%>
<%=(Recordset1.Fields.Item("sex").value)%>



<%
Recordset1.Close()
Set Recordset1 = Nothing
%>


提示错误如下:

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e4d'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'test'.

/mysite/admin.asp, 行8



5D荣誉版主

职务:普通成员
等级:1
金币:10.0
发贴:271
#22002/12/20 14:15:14
数据链接有问题



lixiangwei

职务:普通成员
等级:1
金币:0.0
发贴:57
#32002/12/20 15:48:20
感谢斑竹的回复!小弟愚钝,不明白该如何修改,还望斑竹能给小弟指点一二,小弟这里谢过了!



lixiangwei

职务:普通成员
等级:1
金币:0.0
发贴:57
#42002/12/20 15:58:26
dtmyou在上个帖子中说
引用:
数据链接有问题


还有一个问题,小弟需说明一下,就是在本机测试时,就不存在这样问题。