Hi i am trying a code in asp forms but i got the error either bof or eof is true or no current record
this is my codes
this is my codes
VB.NET:
dim txtpass
dim i
dim counter
dim uname,pword
dim db,rs
uname = request.Form("T1")
'pword = request.Form("T2")
if uname = "" and pword = "" then response.Redirect "login.htm"
set db = server.CreateObject("adodb.connection")
set rs = server.CreateObject ("adodb.recordset")
db.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" + server.MapPath("DB.mdb")
rs.Open "SELECT * FROM ACCT WHERE UN = ' " & uname & " '",db
If rs.EOF = True Or rs.BOF = True Then Exit Sub
WHILE NOT RS.EOF if uname = rs.Fields(0).Value then RESPONSE.Write "Welcome " + uname 'else rs.MoveNext end if
wend
db.Close
Last edited by a moderator: