Click here to Skip to main content
15,880,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<%@ language="VBScript" %>
<% Option Explicit %>
<html>
<body>
<!--#include virtual="/adovbs.inc"-->
<%
Dim objconn, objrs, uname, pwd, flag
uname=Request("t1")
pwd=Request("pwd")
set objconn=server.createobject("ADODB.Connection")
set objrs=server.createobject("ADODB.RecordSet")
objconn.connectionstring="DSN=login.dsn"
objconn.open
objrs.open "logtab",objconn,,,adcmdtable
objrs.movefirst
Do while NOT(objrs.EOF)
If ((objrs("username")=uname) AND (objrs("password")=pwd)) then
flag=1
Exit Do
Elseif ((objrs("username")<>uname) AND (objrs("password")=pwd)) then
flag=0
objrs.movenext
Elseif ((objrs("username")=uname) AND (objrs("password")<>pwd)) then
flag=0
objrs.movenext
Elseif ((objrs("username")<>uname) AND (objrs("password")<>pwd)) then
flag=0
objrs.movenext
End If
loop
If (flag=1) then
Response.redirect("Default.asp")
Else
Response.redirect("login2.asp")
End If
objconn.close
set objconn="nothing"
set objrs="nothing"
%>
</body>
</html>


This is the code that I'm currently running. The name of my Database is "Database21.accdb". What changes do I need to make for the program to function?
Posted
Comments
Shweta N Mishra 5-Dec-14 3:42am    
Are you getting any error, Program looks good.
[no name] 5-Dec-14 6:52am    
It shows an error for the line
<!--#include virtual="/adovbs.inc"-->
Shweta N Mishra 5-Dec-14 6:55am    
so you are missing the file adovbs.inc.

download it and keept at refered location.

you can use this link http://support.web.com/vserver/ntguide/microsoft_adovbs_inc_file.htm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900