0 / 0 / 0
Регистрация: 25.03.2009
Сообщений: 70
|
|
1 | |
Голосовалка, ошибка: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.25.03.2009, 13:30. Показов 4220. Ответов 10
Метки нет Все метки)
(
Вопросы по голосовалке с ответами, из базы вытаскиваются, при нажатии на ГОЛОСОВАТЬ результаты показываются, но на первые три ответа. В остальных случаях ругается так:
ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Код такой: Код
MM_driv_STRING = 'Network=dbmssocn;Provider=SQLOLEDB.1;Password=den123;Persist Security Info=True;User ID=den;Initial Catalog=inet;Data Source=astrum;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=192.168.1.41;Use Encryption for Data=False;Tag with column collation when possible=False' Set rs3 = Server.createObject('ADODB.Recordset') rs3.ActiveConnection = MM_driv_STRING rs3.CursorType = 0 rs3.CursorLocation = 2 rs3.LockType = 3 QuestID = Request.Form('poll') Response.Write(QuestID) rs3.Source = 'SELECT * FROM VAnswers WHERE ansdesc = ' & QuestID rs3.Open() 0 Здесь показывает на ошибку Script Debager 0 total = rs3('total') total = total + 1 rs3.Close()
0
|
|
25.03.2009, 13:30 | |
Ответы с готовыми решениями:
10
ADODB.Field error '80020009' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Ошибка ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current recor ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires Как подавить вывод на экран предупреждения - Either BOF or EOF is True, or the current record has been deleted... ? |
0 / 0 / 0
Регистрация: 29.05.2007
Сообщений: 354
|
|
25.03.2009, 14:35 | 2 |
У меня твой код нормально работает
Проверь, может действительно в таблице VAnswers нет записи с ansdesc=QuestID
0
|
Rider
|
|
25.03.2009, 17:30 | 3 |
всегда надо делать проверку
Код
... rs3.Open() if (not rs3.EoF) then total = rs3('total') total = total + 1 else response.write('no such record') end if rs3.Close() ... |
0 / 0 / 0
Регистрация: 25.03.2009
Сообщений: 70
|
|
26.03.2009, 07:37 [ТС] | 4 |
Большое спасибо за ответы!
да, вместо ansdesk нужно было писать id, запарилась....)) Если не трудно, ещё один вопросик. При нажатии на РЕЗУЛЬТАТЫ выдаётся такая ошибка: The requested properties can not be supported. Вот здесь: Код
QuestID = Request.Form('poll') Response.Write(QuestID) rs3.Source = 'SELECT * FROM VAnswers WHERE id = '&QuestID rs3.Open() 0Вот здесь0 if (not rs3.EoF) then total = rs3('total') total = total + 1 else response.write('нет подобной записи! ') end if rs3.Close()
0
|
Rider
|
|
26.03.2009, 07:50 | 5 |
я делаю не много подругому (хотя ваша нотация также имеет место быть)
Код
MM_driv_STRING = '.....' Set conn = Server.createObject('ADODB.Connection') Set rs3 = Server.createObject('ADODB.Recordset') QuestID = Request.Form('poll') sSql = 'SELECT * FROM VAnswers WHERE ansdesc = ' & QuestID rs3.Open sSql, conn, 3, 3 if (not rs3.EoF) then total = rs3('total') total = total + 1 else response.write('no such record') end if rs3.Close conn.Close set rs3 = nothing set conn = nothing |
Rider
|
|
26.03.2009, 07:54 | 6 |
да и еще
если QuestID = null то будет ошибка. Код
QuestID = Request.Form('poll') sSql = 'SELECT * FROM VAnswers WHERE ansdesc = ' & QuestID rs3.Open sSql, conn, 3, 3 <-- ERROR! Код
QuestID = Request.Form('poll') if (len(QuestID) < 1 OR not isNumeric(QuestID)) then QuestID = 0 sSql = 'SELECT * FROM VAnswers WHERE ansdesc = ' & QuestID rs3.Open sSql, conn, 3, 3 ... |
0 / 0 / 0
Регистрация: 25.03.2009
Сообщений: 70
|
|
26.03.2009, 08:04 [ТС] | 7 |
Ок! спасибо, буду проверять.
0
|
Partyzan
|
|
03.04.2009, 11:16 | 8 |
Посмотрите скрипт голосования здесь www.software.kz
|
0 / 0 / 1
Регистрация: 30.11.2006
Сообщений: 510
|
|
03.04.2009, 12:02 | 9 |
вместо if (not rs3.EoF) then надо if not rs3.EOF then
0
|
0 / 0 / 1
Регистрация: 30.11.2006
Сообщений: 510
|
|
03.04.2009, 12:05 | 10 |
вместо if (not rs3.EoF) then надо if not rs3.EOF then
0
|
Rider
|
|
04.04.2009, 08:25 | 11 |
2monstrU:
какое ценное замечание! а простите в чем разница? |
04.04.2009, 08:25 | |
Помогаю со студенческими работами здесь
11
Ошибка Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record Current Record, Нужно в запросе или в форме прописать номер строчки Фильтрация в dBase выдает "No current record." Drawing operation was attempted when there was no current window. Что за ошибка? Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |