Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 24th, 2006, 04:26 AM
Authorized User
Points: 285, Level: 5
Points: 285, Level: 5 Points: 285, Level: 5 Points: 285, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2005
Location: , , .
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting Time Stamp into SQL

Hi folks,

What I am trying to achieve is when a user logs into my website their username and password is checked against a table in SQL, if their details exists it puts a time stamp in the SQL table of when they last logged in.

Now I got the first part working without a problem, users loggin into and out, but I cannot for the life of me get my head around the last part. In the SQL table I have a field named [Username], a field named [Password], and a field named [Last Login].

I am using Visual Studio 2005 with VB, if anyone has got any code exmaples please let me know.

Thanks!!

Reply With Quote
  #2 (permalink)  
Old May 19th, 2006, 07:14 AM
Friend of Wrox
 
Join Date: May 2006
Location: Delhi, Delhi, India.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let Com is command Object
Update logintable set [Last Login]=@log where [username]=@ur
Com.Parameters.Add("@log",SqlDbType.DateTime,Syste m.DateTime.Now.ToString())
com.Parameters.Add("@ur",usernm)

Bijgupt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
time in sql server is not real time hertendreef SQL Server 2005 6 April 19th, 2007 07:07 AM
store insert/update date/time stamp in sql2k db alexdcosta ASP.NET 2.0 Basics 0 June 22nd, 2006 05:44 AM
Inserting mulitible rows in one table at one time mohanrajb Classic ASP Databases 1 June 21st, 2005 10:09 AM
Date/Time Stamp on Reports dillig BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 August 11th, 2004 08:21 AM
Inserting just the time segment Trojan_uk SQL Server ASP 1 April 15th, 2004 10:03 AM



All times are GMT -4. The time now is 05:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.