|
|
|
|
|
| | |
|
Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Somethings missing, was cut off... |
From: |
Hill Nguyen |
Date: |
1/13/2000 4:23:37 AM |
IP: |
209.209.18.21 |
I add some code in...hope it help.
<%
Dim Myconn
Dim rst
Dim result
Dim pwd
define update statement
dim updateSql
updateSql = "update passowrd"
updateSql = updateSql & " set hastaken = yes"
updateSql = updateSql & " where password = " & pwd & ""
Retrieve the password from the form (this page).
pwd = Request.Form("Password")
If the form hasnt been submitted then bypass this
If pwd <> "" Then
Connect to the database
Set Myconn = Server.CreateObject("ADODB.Connection")
conString = "DBQ=" & Server.MapPath("test.mdb")
Myconn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & conString
Create a recordset object and load all of the records from the database.
Set rst = Server.CreateObject("ADODB.Recordset")
rst.open "Select * From passwords", Myconn
--------------------------------------------
try this
you need to go thourght recordset to search for password
if you find the passord then check if it is used, if not update it to be used
and resirect them.
If rst.eof then
Response.Write "This password doesnt exist..type again"
Else
do while not rst.eof
If rst(0) = pwd then
check to see if it is taken
If rst(1) = "yes" then
Response.write "You cant use this password more than once"
else
update this password to hastaken
Myconn.execute (updateSql)
Response.redirect ("test.asp")
exit do Ð/LM/W3SVC/3/Root |
Previous Message
Follow Up - Re: Somethings missing, was cut off... part2 - Hill Nguyen 1/13/2000 4:25:31 AM
Follow Up - Re: Somethings missing, was cut off... - 1 1/21/2000 2:32:49 PM
|
|

|
|
|
|
|
|
|
|
|
|