Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Recordset Error Message

Posted 20 Dec 2005 11:50:07
1
has voted
20 Dec 2005 11:50:07 Malcolm X posted:
I know this must be so easy but I keep getting the wrong output.

I have a LOGIN PAGE, LOGGED IN PAGE and an ACCESS DATABASE.

When you login, a message should come up and say, "Good evening Mally"

Instead when you login, a message comes up saying,

"Good evening
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/html/search.asp, line 272"

Line 272 reads

<%=(Recordset1.Fields.Item("ChristianName".Value)%>

I have a recordset in the LOGGED IN PAGE,

SELECT ChristianName
FROM tblUsers
WHERE ChristianName = 'MMColParam'

MMColParam 1 Session("ChristianName"

Any suggestions?

Replies

Replied 21 Dec 2005 09:15:28
21 Dec 2005 09:15:28 Dave Clarke replied:
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
Good Evening <%=(Recordset1.Fields.Item("ChristianName".Value)%>
<% End If %>


and if you are using the standard MM log-in behaviour your recordset should be

SELECT ChristianName
FROM tblUsers
WHERE ChristianName = 'MMColParam'

MMColParam 1 Session("MM_Username"

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Edited by - Davecl on 21 Dec 2005 09:16:17
Replied 21 Dec 2005 10:52:11
21 Dec 2005 10:52:11 Malcolm X replied:
Hey there, thanks for the reply.

When I enter this to my code.
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
Good Evening <%=(Recordset1.Fields.Item("ChristianName".Value)%>
<% End If %>

I get this message.
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/html/search.asp, line 50

Line 50 reads.
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>

When I enter this in to my recordset1 and hit the ok button,
SELECT ChristianName
FROM tblUsers
WHERE ChristianName = 'MMColParam'
MMColParam 1 Session("MM_Username"

the recordset forces this back in to the Variables column as well as the .
MMColParam 1 Session("ChristianName"

When I test it all, I get this.
Microsoft VBScript compilation error '800a0411'
Name redefined
/html/search.asp, line 51
Dim Recordset1__MMColParam
----^

Any ideas?

Replied 21 Dec 2005 16:27:11
21 Dec 2005 16:27:11 Dave Clarke replied:
looks like you are trying to define the same recordset twice, make sure you remove your original recordset altogether and then put a new one on the page using the one i gave you.

ASP|VBScript|IIS5.1|Access|WinXPPro & WinXPHome

Reply to this topic