Click to See Complete Forum and Search --> : Object required: '[string: ""]'


gerjan
05-10-2003, 08:15 AM
I get the error below when I set the following value
set username2 = ""
(this is line 21)

I don't get it, I've been testing for days. In my opinion this is one of the most simple lines in ASP?? Does anyone have an idee how to solve this problem


error
---

Microsoft VBScript runtime error '800a01a8'
Object required: '[string: ""]'
protection.inc.asp, line 21



code (this is include that comes up on every page to check the login)
----

<!--#include file="../inc/dbcpd-gebruikers.inc.asp"-->


<%
dim sessionusername, sessionpassword

sessionusername = session ("username")
sessionwachtwoord = session ("wachtwoord")

if sessionusername = "" then
response.redirect "../inc/errorgebruiker.htm"
end if

if sessionwachtwoord = "" then
response.redirect "../inc/errorpass.htm"
end if

dim username2, wachtwoord2


set username2 = ""
set wachtwoord2 = ""

sqstringgebr = "SELECT * FROM protection where username ='"&sessionusername&"'"
set objRSgebr = objConngebr.execute (sqstringgebr)

set username2 = objRSgebr("username")
set wachtwoord2 = objRSgebr("wachtwoord")

if username2 = "" then
response.redirect "../inc/errorgebruiker.htm"
end if

if wachtwoord2 = "" then
response.redirect "../inc/errorpass.htm"
end if

if wachtwoord2 = sessionwachtwoord then
response.write "Welkom"
else
response.redirect "../inc/errorpass2.htm"
end if

objRSgebr.close
objConngebr.close
set objRsgebr = nothing
set objConngebr = nothing
%>

gerjan
05-12-2003, 05:33 AM
After (trough the entire script) deleting 'set' the problem moves a couple of lines below:

set objRSgebr = objConngebr.execute (sqstringgebr)

At this line it gives the same error:
Object required: 'objConngebr'

It doesn't matter if I do or don't put 'set' before the line.
It keeps giving the same error.