Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Just a quick note to say, "THANKS!" for these forums...The site is very well layed out and easy to use. Thanks for bringing us together - we need each other."

Geography

Where in the world do Tek-Tips members come from?

Is it possible to show database record number on confirmationHelpful Member!(2) 

NewGirl999 (TechnicalUser)
11 Jan 10 7:48
I'm working with SQL and Frontpage and have a form for staff to report computer faults to the helpdesk.  The form works really well and displays a confirmation page after submission.  I've been asked to show the record ID or another sequential number on the confirmation page but I can't work out how to do this.

Any help would be very much appreciated.  Thank you.
Helpful Member!  xwb (Programmer)
11 Jan 10 16:34
If it is the last record the SQL is

CODE

select count(*) from table;
It really depends on whether your record IDs from 1 or from some other number.  If they start from say 20, then you'll need to add 20 to the count.
Helpful Member!  Bluejay07 (Programmer)
12 Jan 10 13:20
xwb:

I can see a problem with that query.  If another user creates an entry before the query is run, the count will be higher than expected.

You would need something more specific, such as

CODE

SELECT RecordID FROM TableName WHERE username = 'abc' AND ReportTime = '12:00:00'

Essentially, it all depends on how the table is set up and what columns are used.
NewGirl999 (TechnicalUser)
18 Jan 10 7:47
Thank you xwb and Bluejay07 for your input.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close