Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - It is real problem .. plz help me
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

It is real problem .. plz help me

 Post Reply Post Reply
Author
bogy50 View Drop Down
Newbie
Newbie


Joined: 18 September 2005
Location: Bahrain
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogy50 Quote  Post ReplyReply Direct Link To This Post Topic: It is real problem .. plz help me
    Posted: 18 September 2005 at 7:19am

i ahve a database SQL ... one table have three fields .. one of this fields to store a password ..

that field is empty now , just i have the first and second fields .. so i need to fill the password field with value ..

i wrote script to generate password random .. and i wrote also script to query the table and update password field but it is not working right .. it put the same vlaue in all fields ..

plz see the script and help me to correct it :

set rs =server.CreateObject("adodb.recordset")

sql = " select * from users order by id "
rs.Open sql,conn
if not rs.EOF then
while not rs.EOF
cpr = rs("cpr")
deg = rs("degree_id")
strEncryptedPassword = cpr&deg
strEncryptedPassword = HashEncode(strEncryptedPassword)
data = mid(strEncryptedPassword,10,8)
set rsup = server.CreateObject("adodb.recordset")
sql1 = " update users set pw = '"&data&"' "
rsup.Open sql1,conn
rs.MoveNext
wend
end if
 
plz plz plz help meCryCry<% set rs =.Create("adodb.recordset") sql = " * from users order by id " rs.Open sql,conn if not rs.EOF then while not rs.EOF cpr = rs("cpr") deg = rs("degree_id") strEncrypted = cpr° strEncrypted = HashEncode(strEncrypted) = mid(strEncrypted,10,8) Response.Write set rsup = .Create("adodb.recordset") sql1 = " update users set pw = '"&&"' " rsup.Open sql1,conn rs.MoveNext wend end if %>
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.