Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Update a table through a command click

Status
Not open for further replies.

arudeguy

IS-IT--Management
May 31, 2003
6
0
0
US
I have 2 tables:

tblUsers
ID
email
.
tblUsersSecurity
ID
Username
Password
.

I have a basic form that displays every field of tblUsers. I'd like to add a command button that:
1) encrypts tblUsers.ID (I have a component for that)
2) updates tblUserSecurity setting Username=tblUsers.Email, and password=encrypted tblUsers.ID

Here's how I have done it in vbscript(ASP):

Set cryObject = server.createobject("mycrypto.crypto")
set conn=server.createobject("adodb.connection")
conn.Open strConn

strsql="update tblUserSecurity set PASSWORD = '" & cryObject.OmnisHash(ID) & "',username= '" & email & "' where ID='" & cid & "'"

conn.execute(strsql)
conn.close
set conn=nothing
set cryObject=Nothing

What I don't know how to do is get the values from the form and how to put the right values in tblUserSecurity. I assume I would use a Module of some sort.

Any help would be GREATLY appreciated.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top