I have added a password field to my members database. I want to add a unique password to each member in the table. The code I have created does not update all the fields, it seems to only loop around the first record and constantly update it with new passwords. It is somehow stuck in that loop. Can anyone help? Here is the code
Code:
<%
Dim fs, i, x
Dim strTemp
Dim rsMember
Dim rsSelect
Dim sql2
Dim intID
Dim strSQL
sql2 = "Select memberID From tbl_Members;"
Set rsSelect = Server.CreateObject("ADODB.Recordset")
rsSelect.Open sql2, adoCon
Set fs = CreateObject("Scripting.FileSystemObject")
Set rsMember = Server.CreateObject("ADODB.Recordset")
Do Until rsSelect.EOF
intID = rsSelect("memberID")
'Get just the filename part of the temp name path
strTemp = fs.GetBaseName(fs.GetTempName)
'Hack off the 'rad'
strTemp = Right(strTemp, Len(strTemp) - 3)
strSQL = "Select tbl_Members.* FROM tbl_Members Where memberID ="& intID
rsMember.CursorType = 2
rsMember.LockType = 3
rsMember.Open strSQL, adoCon
rsMember.Fields("memberPassword") = strTemp
rsMember.Update
rsMember.Close
Response.Write strTemp & "<br>"
Loop
Set fs = Nothing
Set rsMember = Nothing
rsSelect.Close
Set rsSelect = Nothing
%>