在此上下文中不允许操作 Moveprevious
Operation is not allowed in this context Moveprevious
我收到错误 ADODB.Recordset 错误 '800a0c93'
在 recordset3.moveprevious 的上下文中不允许操作。
我认为这可能与光标类型有关?我试过添加
recordset3.CursorType = adOpenDynamic
recordset3.open FINDPART,adoCon
但出现同样的错误。
有人能看出我的代码有什么问题吗?
set recordset3=Server.CreateObject("ADODB.recordset")
recordset3.open FINDPART,adoCon,3,3
<% do while not recordset3.eof %>
<% if recordset3.fields("product2") = findme then
response.write("yes")
recordset3.movenext
nextpart = recordset3.fields("product2")
recordset3.moveprevious
recordset3.moveprevious
previouspart = recordset3.field("product")
exit do
end if
recordset3.movenext
loop%>
已解决 - 光标类型需要为 1
set recordset3=Server.CreateObject("ADODB.recordset")
recordset3.cursortype = 1
recordset3.open FINDPART,adoCon
我收到错误 ADODB.Recordset 错误 '800a0c93'
在 recordset3.moveprevious 的上下文中不允许操作。
我认为这可能与光标类型有关?我试过添加
recordset3.CursorType = adOpenDynamic
recordset3.open FINDPART,adoCon
但出现同样的错误。
有人能看出我的代码有什么问题吗?
set recordset3=Server.CreateObject("ADODB.recordset")
recordset3.open FINDPART,adoCon,3,3
<% do while not recordset3.eof %>
<% if recordset3.fields("product2") = findme then
response.write("yes")
recordset3.movenext
nextpart = recordset3.fields("product2")
recordset3.moveprevious
recordset3.moveprevious
previouspart = recordset3.field("product")
exit do
end if
recordset3.movenext
loop%>
已解决 - 光标类型需要为 1
set recordset3=Server.CreateObject("ADODB.recordset")
recordset3.cursortype = 1
recordset3.open FINDPART,adoCon