Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Generate unique characters????

Generate unique characters????

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Chitrali
    wrote on last edited by
    #1

    I am devoloping Flight Reservation System. I want to generate six unique character for the purpose of reservation number to the client who online make his reservation. Any help please???????? aLi

    M G 2 Replies Last reply
    0
    • M Muhammad Chitrali

      I am devoloping Flight Reservation System. I want to generate six unique character for the purpose of reservation number to the client who online make his reservation. Any help please???????? aLi

      M Offline
      M Offline
      Muhammad Chitrali
      wrote on last edited by
      #2

      I am using ASP.Net, C#. aLi

      1 Reply Last reply
      0
      • M Muhammad Chitrali

        I am devoloping Flight Reservation System. I want to generate six unique character for the purpose of reservation number to the client who online make his reservation. Any help please???????? aLi

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        There are generally two methods: 1. Generate the code by encrypting the unique id of the reservation. 2. Generate a code randomly and check against that database that it isn't in use already. --- b { font-weight: normal; }

        M 1 Reply Last reply
        0
        • G Guffa

          There are generally two methods: 1. Generate the code by encrypting the unique id of the reservation. 2. Generate a code randomly and check against that database that it isn't in use already. --- b { font-weight: normal; }

          M Offline
          M Offline
          Muhammad Chitrali
          wrote on last edited by
          #4

          I have used System.Guid.NewGuid().ToString(); is it OK???. since it generates unique id. other problem that i am facing is that how i store reservation id, passenger information in a database. I am using SQL DATABASE which is in ASP.Net 2.0. How can i insert values in that database. I can insert values using SQL SERVER 2000 by using code. But i don't know how i can do it using SQL DATABASE in ASP.Net 2.0 Please help me.... aLi

          G 1 Reply Last reply
          0
          • M Muhammad Chitrali

            I have used System.Guid.NewGuid().ToString(); is it OK???. since it generates unique id. other problem that i am facing is that how i store reservation id, passenger information in a database. I am using SQL DATABASE which is in ASP.Net 2.0. How can i insert values in that database. I can insert values using SQL SERVER 2000 by using code. But i don't know how i can do it using SQL DATABASE in ASP.Net 2.0 Please help me.... aLi

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            There is no database included in ASP.NET. Do you mean the database that comes with Visual Studio? That is the developers edition of SQL Server. It works just the same. Use an identifier in the database to create the unique id instead. --- b { font-weight: normal; }

            M 1 Reply Last reply
            0
            • G Guffa

              There is no database included in ASP.NET. Do you mean the database that comes with Visual Studio? That is the developers edition of SQL Server. It works just the same. Use an identifier in the database to create the unique id instead. --- b { font-weight: normal; }

              M Offline
              M Offline
              Muhammad Chitrali
              wrote on last edited by
              #6

              Thanks b... I have done it. aLi

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups