0
允許我收到錯誤ADODB.Recordset錯誤「800a0c93」操作無法在這種情況下Moveprevious
操作是不允許在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%>
而不是硬編碼考慮使用'常量常量adOpenKeyset = 1'或者更好的是[使用元數據導入DLL常數(HTTP: //www.4guysfromrolla.com/webtech/110199-1.shtml)直接來自ADODB Library。 – Lankymart