ADODB error - please help?

M

Mark

Hi - Can anyone please help with the error message below - server is XP
Pro, and the ASP code it is failing at is (set
MM_rsUser.ActiveConnection... as below):

<%
MM_valUsername=CStr(Request.Form("username"))
If MM_valUsername <> "" Then
MM_redirectLoginSuccess="fixit_ebase.asp"
MM_redirectLoginFailed="fixit_login.asp?failed=yes"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = conFixitCon
MM_rsUser.Source = "SELECT username, userpassword,
email,edtick,adfix,apfix,delfix,sendap,amuser,viewcom,viewst,viewrev,vie
wstats,edstmts,qrydb,efstats,edclient,canview,browsol FROM tblaccess
WHERE username='" & Replace(MM_valUsername,"'","''") &"' AND
userpassword='" & Replace(Request.Form("userpassword"),"'","''") & "'"
..
..


Please try the following:

Click the Refresh button, or try again later.

Open the pc2 home page, and then look for links to the information you
want.

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

------------------------------------------------------------
Technical Information (for support personnel)

Error Type:
ADODB.Recordset (0x800A0E7A)
Unknown runtime error
/sitefiles/login.asp, line 56

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Alexa Toolbar;
..NET CLR 1.1.4322)

Page:
POST 46 bytes to /sitefiles/login.asp

POST Data:
username=admin&userpassword=admin&Submit=Login

Time:
02 December 2003, 19:26:22

More information:
Microsoft Support
 
A

Aaron Bertrand [MVP]

See http://www.aspfaq.com/2340

Stop letting wysiwyg editors created such bloated code

<%
username = replace(Request.Form("username"), "'", "''")
password = Request.Form("userpassword"), "'", "''")
if username <> "" and password <> "" then
sql = "SELECT COUNT(*) FROM tblaccess " & _
" WHERE username='" & username & "'" & _
" AND userpassword='" & password & "'"
set rs = conFixitCon.execute(sql)
if not rs.eof then
response.redirect "fixit_ebase.asp"
else
response.redirect "fixit_login.asp?failed=yes"
end if
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top