Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 16th, 2008, 06:22 AM
Registered User
Join Date: Oct 2007
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ref numbers


We are currently building a system where a user can submit a request and is given an automated ref number ie 1001 (we are using identity in sql to auto generate the ref number). If that request gets rejected a user can resubmit the request by entering their ref number which will bring up their previous request, amend it and submit it again however when they submit it it adds an a, b, c etc to the end of the request ie 1001a. We have created a separate table in the db to hold the re-submitted requests so as not to overwrite the previous requests and so it doesn't auto generate a new number when another row is added to the table and so we can hold the alphanumeric characters.

Is this the right way to go about it? Can anyone give us an idea on how to add the alphanumeric character to the end of the ref number?

Many thanks

  #2 (permalink)  
Old January 16th, 2008, 07:41 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there..

add a char to the end of a number is a string concatenation, nothing dificult.

But without seeing your system and not knowing how exactly works, if the new request is exactly the same as the old one (maybe with some change?) why not give the user a new ref. number and has a field in the same table that point to the last ref. number (or null is that is the first one?)



================================================== =========
Read this if you want to know how to get a correct reply for your question:
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
================================================== =========
I know that CVS was evil, and now i got the proof:
================================================== =========
  #3 (permalink)  
Old January 16th, 2008, 11:29 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Ask yourself these questions:

Do you have it working? Are you content with it working this way?

Are business rule such that this is an acceptable solution?

When you ask
Is this the right way to go about it?
are you asking if it's the right technical solution (i.e. second table with a text field for ref "#" instead of another solution) or are you asking if this is the right logical solution (i.e. appending a char to the end of an integer to indicate re-submitted requests)?

Echoing my previous questions: If the logical solution is acceptable by your business rules and the technical solution works, then sure, it's a perfectly fine way of doing it.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership - Ref: Chapter 8 JayLou BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 April 11th, 2007 10:24 AM
Using ref in xml ooper01 XML 1 February 24th, 2007 06:10 AM
convert from 'ref double[]' to 'ref object' wakeup C# 0 April 7th, 2006 05:14 AM
By Val By Ref B.V.Madhav Crystal Reports 1 May 12th, 2005 11:37 PM
Array to ref parameter dedex C# 4 February 12th, 2005 02:58 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.