Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: DB update


Message #1 by Kevin Jullion <kevinj@a...> on Wed, 26 Sep 2001 15:07:10 -0400
Still trying to come to terms with .NET and struggling to see how I can
do a relatively simple DB update using ASP.Net
 
I have a form that validates a user against a record in a database.
That is working fine.  But in validating the user I'd like to also track
the fact that they logged-in successfully by incrementing the LoginCount
column and the LastLoginDate column in the Users table.
 
In old ASP & old ADO this was a matter of setting up a connection object
to the db and then executing an "UPDATE" statement, like this, for
example.: 
    db.Execute "UPDATE Users SET LoginCount=LoginCount+1,
LastLoginDate=GETDATE() WHERE UserID=12
 
Anyone have a quick pointer on where to look for this sort of answer in
the new .NET stuff?
 

Thanks, 
Kevin Jullion


  Return to Index